Skip to main content
Tab

FileManagerSettingsContextMenu Class

Provides settings that affect the context menu appearance and functionality.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public class FileManagerSettingsContextMenu :
    FileManagerSettingsBase

The following members return FileManagerSettingsContextMenu objects:

Library Related API Members
ASP.NET Web Forms Controls ASPxFileManager.SettingsContextMenu
ASP.NET MVC Extensions FileManagerSettings.SettingsContextMenu

Remarks

Use the ASPxFileManager’s ASPxFileManager.SettingsContextMenu property to access context menu settings.

Example

Web Forms (in markup):

<dx:ASPxFileManager ID="FileManager" ClientInstanceName="FileManager" runat="server" >    
    <SettingsContextMenu Enabled="true">
        <Items>
            <dx:FileManagerToolbarMoveButton />
            <dx:FileManagerToolbarCustomButton Text="Properties" CommandName="Properties" BeginGroup="true">
                <Image IconID="setup_properties_16x16" />
            </dx:FileManagerToolbarCustomButton>
        </Items>
    </SettingsContextMenu>
    ...
</dx:ASPxFileManager>

Web Forms (in code):

ASPxFileManager fm = new ASPxFileManager();
...
FileManagerToolbarMoveButton moveButton = new FileManagerToolbarMoveButton();
moveButton.BeginGroup = false;

FileManagerToolbarCustomButton customButton = new FileManagerToolbarCustomButton();
customButton.CommandName = "Properties";
customButton.BeginGroup = true;
customButton.Image.IconID = "setup_properties_16x16";

FileManager.SettingsContextMenu.Items.Add(moveButton);
FileManager.SettingsContextMenu.Items.Add(customButton);
...

MVC:

@Html.DevExpress().FileManager( settings => {
    settings.Name = "fileManager";

    FileManagerToolbarMoveButton moveButton = new FileManagerToolbarMoveButton();
    moveButton.BeginGroup = false;

    FileManagerToolbarCustomButton customButton = new FileManagerToolbarCustomButton();
    customButton.CommandName = "Properties";
    customButton.BeginGroup = true;
    customButton.Image.IconID = "setup_properties_16x16";

    settings.SettingsContextMenu.Items.Add(moveButton);
    settings.SettingsContextMenu.Items.Add(customButton);
    ...
}).BindToFolder(Model).GetHtml()

Online Demo

See Also