FileManagerSettingsContextMenu.Items Property
Gets a collection of context menu items.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v20.2.dll
Declaration
public FileManagerToolbarItemCollection Items { get; }
Public ReadOnly Property Items As FileManagerToolbarItemCollection
Property Value
Type | Description |
---|---|
FileManagerToolbarItemCollection | A FileManagerToolbarItemCollection object that is a collection of context menu items. |
Available values:
Name | Description |
---|---|
CreateDefaultItems() | Populates the toolbar item collection with default items. |
FindByCommandName(String) | Returns an item object with the specified CommandName property value. |
FileManagerToolbarItemCollection(IWebControlObject) | Initializes a new instance of the FileManagerToolbarItemCollection class with the specified owner. |
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to Items |
---|---|---|
ASP.NET Controls and MVC Extensions | ASPxFileManager |
|
HtmlEditorFileManager |
|
|
RichEditFileManager |
|
|
RichEditFolderManager |
|
|
ASP.NET Bootstrap Controls | BootstrapFileManager |
|
BootstrapFileManager |
|
|
ASP.NET MVC Extensions | FileManagerSettings |
|
MVCxFileManager |
|
Remarks
The file manager provides the context menu if the FileManagerSettingsContextMenu.Enabled property is set to true. Use the Items property to customize the context menu items. If the item collection is empty, the context menu displays default items.
Use the ASPxFileManager.StylesContextMenu property to customize the context menu appearance.
Concept
Example
Web Forms (declaratively):
<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()