diff --git a/wpf/Diagram/Interaction/UserHandle.md b/wpf/Diagram/Interaction/UserHandle.md index db92db2d6c..3bc2d7637c 100644 --- a/wpf/Diagram/Interaction/UserHandle.md +++ b/wpf/Diagram/Interaction/UserHandle.md @@ -23,35 +23,35 @@ SfDiagram provides support to define custom quick command around the Nodes, Conn {% highlight Xaml %} - + {% endhighlight %} {% highlight C# %} // Element to represent the frequently used commands - QuickCommandViewModel quick = new QuickCommandViewModel() - { - // Outer part of quick command. - Shape = this.Resources["Ellipse"], - // appearence of shape. - ShapeStyle = this.Resources["QuickCommandstyle"] as Style, - //Inner part of quick command and it allows to host any UI elements - Content = - "M3.7399902,0L16,12.258972 28.26001,0 32,3.7399902 19.73999,16 32,28.258972 28.26001,32 16,19.73999 3.7399902,32 0,28.258972 12.26001,16 0,3.7399902z", - - Command = (Diagram.Info as IGraphInfo).Commands.Cut - }; - - // Adding new QuickCommand object in Commands collection - (Diagram.SelectedItems as SelectorViewModel).Commands = new QuickCommandCollection() - { - quick - }; +QuickCommandViewModel quick = new QuickCommandViewModel() +{ + // Outer part of quick command. + Shape = this.Resources["Ellipse"], + // appearence of shape. + ShapeStyle = this.Resources["QuickCommandstyle"] as Style, + //Inner part of quick command and it allows to host any UI elements + Content = + "M3.7399902,0L16,12.258972 28.26001,0 32,3.7399902 19.73999,16 32,28.258972 28.26001,32 16,19.73999 3.7399902,32 0,28.258972 12.26001,16 0,3.7399902z", + + Command = (Diagram.Info as IGraphInfo).Commands.Cut +}; + +// Adding new QuickCommand object in Commands collection +(Diagram.SelectedItems as SelectorViewModel).Commands = new QuickCommandCollection() +{ + quick +}; {% endhighlight %} {% endtabs %} @@ -70,9 +70,9 @@ N> By default QuickCommand will host on Node. [VisibilityMode](https://help.sync QuickCommand can be aligned relative to boundaries of the Node or segments of the Connector. -* [`OffsetX`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetX) and [`OffsetY`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetY) property of QuickCommand is used to align the QuickCommand based on fractions. The default value is 0.5. -* [`HorizontalAlignment`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_HorizontalAlignment) and [`VerticalAlignment`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_VerticalAlignment) properties are used to align the quick commands for horizontal and vertical positions. -* [`Margin`](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_Margin) is an absolute value used to add some blank space in any one of its four sides. +* [OffsetX](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetX) and [OffsetY](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_OffsetY) property of QuickCommand is used to align the QuickCommand based on fractions. The default value is 0.5. +* [HorizontalAlignment](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_HorizontalAlignment) and [VerticalAlignment](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_VerticalAlignment) properties are used to align the quick commands for horizontal and vertical positions. +* [Margin](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Diagram.QuickCommandViewModel.html#Syncfusion_UI_Xaml_Diagram_QuickCommandViewModel_Margin) is an absolute value used to add some blank space in any one of its four sides. The Alignment of QuickCommand is similar to [Annotation Alignment](https://help.syncfusion.com/wpf/sfdiagram/annotation/positioningandappearance).