Back to Devexpress

DiagramDesignerControl.Actions Property

wpf-devexpress-dot-xpf-dot-diagram-dot-diagramdesignercontrol.md

latest3.6 KB
Original Source

DiagramDesignerControl.Actions Property

Provides access to the collection of actions provided by the diagram designer ribbon.

Namespace : DevExpress.Xpf.Diagram

Assembly : DevExpress.Xpf.Diagram.v25.2.dll

NuGet Package : DevExpress.Wpf.Diagram

Declaration

csharp
public ObservableCollection<IControllerAction> Actions { get; }
vb
Public ReadOnly Property Actions As ObservableCollection(Of IControllerAction)

Property Value

TypeDescription
ObservableCollection<IControllerAction>

The collection of actions.

|

Remarks

The following code snippet shows how to add a ribbon group with a custom BarButtonItem to the diagram designer ribbon.

xaml
<dxdiag:DiagramDesignerControl.Actions>
    <dxb:InsertAction ContainerName="rpHome">
        <dxb:InsertAction.Element>
            <dxr:RibbonPageGroup Caption="Custom Commands" Name="CustomCommandsGroup"/>
        </dxb:InsertAction.Element>
    </dxb:InsertAction>
    <dxb:InsertAction ContainerName="CustomCommandsGroup">
        <dxb:InsertAction.Element>
            <dxb:BarButtonItem Content="Custom Action" ItemClick="BarButtonItem_ItemClick" />
        </dxb:InsertAction.Element>
    </dxb:InsertAction>
</dxdiag:DiagramDesignerControl.Actions>

To hide a ribbon group, use the UpdateAction bar action.

xaml
<dxdiag:DiagramDesignerControl.Actions>
    <dxb:UpdateAction xmlns:sys="clr-namespace:System;assembly=mscorlib"
                    ElementName="{x:Static dxdiag:DefaultBarItemNames.FontRibbonGroup}" PropertyName="IsVisible">
        <sys:Boolean>False</sys:Boolean>
    </dxb:UpdateAction>
</dxdiag:DiagramDesignerControl.Actions>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Actions property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-diagram-change-connection-points/CS/MainWindow.xaml#L19

xml
Position="300,200" />
<dxdiag:DiagramDesignerControl.Actions>
    <dxb:InsertAction ContainerName="{x:Static dxdiag:DefaultBarItemNames.ToolsGroup}">

See Also

How to Modify RibbonControl Items and Properties in DiagramDesignerControl

DiagramDesignerControl Class

DiagramDesignerControl Members

DevExpress.Xpf.Diagram Namespace