LayoutController.CreateCommand<T>(BaseLayoutItem[]) Method
Creates the specified layout command for the specified items.
Namespace: DevExpress.Xpf.Docking
Assembly: DevExpress.Xpf.Docking.v24.1.dll
NuGet Package: DevExpress.Wpf.Docking
Declaration
public T CreateCommand<T>(
BaseLayoutItem[] items
)
where T : LayoutControllerCommand, new()
Parameters
Name | Type | Description |
---|---|---|
items | BaseLayoutItem[] | An array of BaseLayoutItem objects with which the created command is associated. |
Type Parameters
Name |
---|
T |
Returns
Type | Description |
---|---|
T | The created command. |
Remarks
There exist several commands provided by the DXDocking library supporting the layout functionality. You can bind commands to buttons. As a result, clicking the button will invoke the corresponding layout functionality. The following are the available layout commands, declared in the DevExpress.Xpf.Docking namespace.
Note
All these commands are enabled only in Customization Mode.
- ShowCaptionCommand - Displays (hides) a LayoutControlItem’s caption. This command toggles the item’s BaseLayoutItem.ShowCaption property.
- ShowControlCommand - Displays (hides) a LayoutControlItem’s control. This command toggles the LayoutControlItem.ShowControl property.
- CaptionImageBeforeTextCommand - Displays an image before the caption. This command sets the BaseLayoutItem.CaptionImageLocation property to ImageLocation.BeforeText.
- CaptionImageAfterTextCommand - Displays an image before the caption. This command sets the BaseLayoutItem.CaptionImageLocation property to ImageLocation.AfterText.
- CaptionLocationLeftCommand - Displays the caption to the left of the item. This command sets the BaseLayoutItem.CaptionLocation property to Left.
- CaptionLocationRightCommand - Displays the caption to the right of the item. This command sets the BaseLayoutItem.CaptionLocation property to Right.
- CaptionLocationTopCommand - Displays the caption at the top of the item. This command sets the BaseLayoutItem.CaptionLocation property to Top.
- HideItemCommand - Hides the item. This command calls the LayoutController.Hide method.
- RestoreItemCommand - Restores the item from the hidden state, adding it to the layout. This command calls the LayoutController.Restore method.
For more information on commands, see the Commanding Overview topic in MSDN.