Class DiagramViewModel
Represets the diagram control is used for creating diagrams like flow charts, organizational charts, mind maps, floor plans, and swim lane diagrams either through code or through a visual interface.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Diagram
Assembly: Syncfusion.SfDiagram.WPF.dll
Syntax
public class DiagramViewModel : DiagramElementViewModel, IDiagramElement, IID, IGraph, INotifyPropertyChanged
Constructors
DiagramViewModel()
Creates new instance of DiagramViewModel class.
Declaration
public DiagramViewModel()
Properties
AnnotationChangedCommand
Gets or sets the annotationchangedcommand to invoke when the annotation changed
Declaration
public ICommand AnnotationChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
AnnotationConstraints
Gets or sets the default behaviors of the annotation.
Declaration
public AnnotationConstraints AnnotationConstraints { get; set; }
Property Value
Type |
---|
AnnotationConstraints |
AutoScrolledCommand
Gets or sets the autoscrolledcommand to invoke when perform autoscroll for diagram elements.
Declaration
public ICommand AutoScrolledCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
BezierSmoothness
Gets or sets the beziersmoothness of the diagram.
Declaration
public BezierSmoothness BezierSmoothness { get; set; }
Property Value
Type |
---|
BezierSmoothness |
BpmnGroupDropIndicatorStyle
Gets or sets the drop indicator style for the BpmnGroup.
Declaration
public Style BpmnGroupDropIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
BridgeDirection
Gets or sets the direction of line bridges.
Declaration
public BridgeDirection BridgeDirection { get; set; }
Property Value
Type |
---|
BridgeDirection |
CommandManager
Gets or sets the CommandManager of the Diagram to customize the keyboad command.
Declaration
public CommandManager CommandManager { get; set; }
Property Value
Type |
---|
CommandManager |
ConnectionIndicatorStyle
Gets or sets the connection indicator style for the Node and Port while in connecting state.
Declaration
public Style ConnectionIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
ConnectorDropIndicatorStyle
Gets or sets the drop indicator style for connector.
Declaration
public Style ConnectorDropIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
ConnectorEditingCommand
Gets or sets the connector editing command invokes when the connector is editing.
Declaration
public ICommand ConnectorEditingCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Connectors
Gets or sets the IConnector collection of the diagram.
Declaration
public object Connectors { get; set; }
Property Value
Type |
---|
System.Object |
ConnectorSelectionIndicatorStyle
Gets or sets the selection indicator style for the Connector.
Declaration
public Style ConnectorSelectionIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
ConnectorSourceChangedCommand
Gets or sets the connectorsourcechangedcommand to invoke when the connector source thumb is changed.
Declaration
public ICommand ConnectorSourceChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ConnectorTargetChangedCommand
Gets or sets the connectortargetchangedcommand to invoke when the connector target thumb is changed.
Declaration
public ICommand ConnectorTargetChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Constraints
Gets or sets the default behaviors of the diagram.
Declaration
public GraphConstraints Constraints { get; set; }
Property Value
Type |
---|
GraphConstraints |
DataSourceSettings
Gets or sets the data source that is to be bound with diagram.
Declaration
public IDataSourceSettings DataSourceSettings { get; set; }
Property Value
Type |
---|
IDataSourceSettings |
DefaultConnectorType
Gets or sets the default connectortype.
Declaration
public ConnectorType DefaultConnectorType { get; set; }
Property Value
Type |
---|
ConnectorType |
DragEnterCommand
Gets or sets the itemdragcommand to invoke when the input system reports an underlying drag command with this element as the drag target.
Declaration
public ICommand DragEnterCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
DragLeaveCommand
Gets or sets the itemdragleavecommand to invoke when the input system reports an underlying drag command with this element as the drag origin.
Declaration
public ICommand DragLeaveCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
DragOverCommand
Gets or sets the itemdragovercommand to invoke when the input system reports an underlying drag command with this element as the potential drop target.
Declaration
public ICommand DragOverCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
DrawingTool
Gets or sets the type of object to be drawn through drawing tool.
Declaration
public DrawingTool DrawingTool { get; set; }
Property Value
Type |
---|
DrawingTool |
DropCommand
Gets or sets the itemdropcommand to invoke when the input system reports an underlying drop command with this element as the drop target.
Declaration
public ICommand DropCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
EnableConnectorSplitting
Gets or sets the value indicating whether a connector can be splitted or not when node dropped on a connector.
Declaration
public bool EnableConnectorSplitting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true the connector will be splitted when the node is dropped on the connector; otherwise, false. The default value is false. |
ExportSettings
Gets or sets the content of the diagram can be exported as raster image files by using Export function.
Declaration
public ExportSettings ExportSettings { get; set; }
Property Value
Type |
---|
ExportSettings |
FirstSelectionIndicatorStyle
Gets or sets the selection indicator style for the first selecteditem.
Declaration
public Style FirstSelectionIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
GetDrawTypeCommand
Gets or sets the getdrawtypecommand to invoke when draw a object via drawingtool to decide the drawing object.
Declaration
public ICommand GetDrawTypeCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
GetLayoutInfoCommand
Gets or sets the getlayoutcommand to invoke when changes occurs in layout.
Declaration
public ICommand GetLayoutInfoCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Remarks
GetLayoutInfoCommand fires only for Organization layout type.
Groups
Gets or sets the IGroup collection of the diagram.
Declaration
public object Groups { get; set; }
Property Value
Type |
---|
System.Object |
HasChanges
Gets or sets a value indicating whether the diagram has any unsaved changes since the last save.
Declaration
public bool HasChanges { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true, if the document has unsaved changes; otherwise, false. |
HistoryChangedCommand
Gets or sets the historychangedcommand to invoke when the history stack changes.
Declaration
public ICommand HistoryChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
HistoryManager
Gets or sets the history of the diagram pages which used to log the custom datas.
Declaration
public HistoryManager HistoryManager { get; set; }
Property Value
Type |
---|
HistoryManager |
HitPadding
Gets or sets when the port should be visible.
Declaration
public double HitPadding { get; set; }
Property Value
Type |
---|
System.Double |
HorizontalRuler
Gets or sets the horizontal ruler of the diagram.
Declaration
public Ruler HorizontalRuler { get; set; }
Property Value
Type |
---|
Ruler |
ItemAddedCommand
Gets or sets the itemaddedcommand to invoke when the item is added to diagram.
Declaration
public ICommand ItemAddedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemAddingCommand
Occurs before an item is added to the SfDiagram.
Declaration
public ICommand ItemAddingCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemDeletedCommand
Gets or sets the itemdeletedcommand to invoke when the element is Deleted.
Declaration
public ICommand ItemDeletedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemDeletingCommand
Gets or sets the itemdeletingcommand to invoke when the element goes for delete.
Declaration
public ICommand ItemDeletingCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemDoubleTappedCommand
Gets or sets the itemdoubletappedcommand to invoke when double click on the diagram or diagram elements.
Declaration
public ICommand ItemDoubleTappedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemSelectedCommand
Gets or sets the itemselectedcommand to invoke when select the diagram elements.
Declaration
public ICommand ItemSelectedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemSelectingCommand
Gets or sets the itemselectingcommand when the element goes for select.
Declaration
public ICommand ItemSelectingCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemTappedCommand
Gets or sets the itemtappedcommand to invoke when click on the diagram or diagram elements.
Declaration
public ICommand ItemTappedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemUnSelectedCommand
Gets or sets the itemunselectedcommand to invoke when the selection goes to unselection.
Declaration
public ICommand ItemUnSelectedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
ItemUnSelectingCommand
Gets or sets the itemunselectingcommand when the element goes for unselect.
Declaration
public ICommand ItemUnSelectingCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
KnownTypes
Gets or sets the knowntypes of the diagram elements properties for serialization.
Declaration
public GetTypes KnownTypes { get; set; }
Property Value
Type |
---|
GetTypes |
LaneDropIndicatorStyle
Gets or sets the drop indicator style for the Lane.
Declaration
public Style LaneDropIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
LayoutManager
Gets or sets the layoutmanager of the diagram to manage layouts.
Declaration
public LayoutManager LayoutManager { get; set; }
Property Value
Type |
---|
LayoutManager |
LayoutUpdatedCommand
Gets or sets the refreshlayoutcommand to invoke when the layout is changed.
Declaration
public ICommand LayoutUpdatedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
LineRoutingSettings
Gets or sets the LineRoutingSettings to customize the routing.
Declaration
public LineRoutingSettings LineRoutingSettings { get; set; }
Property Value
Type |
---|
LineRoutingSettings |
Menu
Gets or sets some additional menu items for contentmenu.
Declaration
public DiagramMenu Menu { get; set; }
Property Value
Type |
---|
DiagramMenu |
MenuItemClickedCommand
Gets or sets the menuitemclickedcommand to invoke when a DiagramMenuItem is clicked..
Declaration
public ICommand MenuItemClickedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MenuItemCommand
Gets or sets the Menuitem command of the Diagram.
Declaration
public ICommand MenuItemCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MenuOpeningCommand
Gets or sets the menuopeningcommand to invoke when any context menu on the element is opened.
Declaration
public ICommand MenuOpeningCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MouseDownCommand
Gets or sets the mousedowncommand to invoke when the mouse pointer is over the control and a mouse button is pressed.
Declaration
public ICommand MouseDownCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MouseUpCommand
Gets or sets the mouseupcommand to invoke when the mouse pointer is over the control and a mouse button is released.
Declaration
public ICommand MouseUpCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
MultipleSelectionMode
Gets or sets the MultipleSelectionMode of the Diagram.
Declaration
public MultipleSelectionMode MultipleSelectionMode { get; set; }
Property Value
Type |
---|
MultipleSelectionMode |
NodeChangedCommand
Gets or sets the nodechangedcommand to invoke when the node is changed.
Declaration
public ICommand NodeChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
NodeDropIndicatorStyle
Gets or sets the drop indicator style for the node.
Declaration
public Style NodeDropIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
Nodes
Gets or sets the INode collection of the diagram.
Declaration
public object Nodes { get; set; }
Property Value
Type |
---|
System.Object |
NodeSelectionIndicatorStyle
Gets or sets the selection indicator style for the node.
Declaration
public Style NodeSelectionIndicatorStyle { get; set; }
Property Value
Type |
---|
System.Windows.Style |
ObjectDrawnCommand
Gets or sets the objectdrawncommand to invoke when the draw a element in the diagram.
Declaration
public ICommand ObjectDrawnCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
OutlineSettings
Gets or sets the OutlineSettings is used to display the mirror images for the outside viewport elements to avoid the empty elements in virtualization Mode.
Declaration
public IOutlineSettings OutlineSettings { get; set; }
Property Value
Type |
---|
IOutlineSettings |
PageSettings
Gets or sets the size and appearance of the diagram pages.
Declaration
public IPageSettings PageSettings { get; set; }
Property Value
Type |
---|
IPageSettings |
PortChangedCommand
Gets or sets the portchanged command to invoke when the port is changed.
Declaration
public ICommand PortChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
PortHoverEffect
Gets or sets the animation effect while hovering the mouse on the port.
Declaration
public PortHoverEffect PortHoverEffect { get; set; }
Property Value
Type | Description |
---|---|
PortHoverEffect | The default animation effect will be Ripple. |
PortVisibility
Gets or sets when the port should be visible.
Declaration
public PortVisibility PortVisibility { get; set; }
Property Value
Type |
---|
PortVisibility |
PreviewSettings
Gets or sets the size and appearance of the diagram pages.
Declaration
public PreviewSettings PreviewSettings { get; set; }
Property Value
Type |
---|
PreviewSettings |
PrintingCommand
Gets or sets the printing command to invoke when print the diagram.
Declaration
public ICommand PrintingCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
PrintingService
Gets or sets whether register or unregister a printing task of the diagram.
Declaration
public PrintingService PrintingService { get; set; }
Property Value
Type |
---|
PrintingService |
ResizerConstraints
Gets or sets the default resizer behaviors of the Node/Group.
Declaration
public ResizerConstraints ResizerConstraints { get; set; }
Property Value
Type |
---|
ResizerConstraints |
ScrollSettings
Gets or sets the ScrollSettings of the diagram to customize the scrolling.
Declaration
public ScrollSettings ScrollSettings { get; set; }
Property Value
Type |
---|
ScrollSettings |
ScrollViewerRenderMode
Gets or sets the ScrollViewerRenderMode of the diagram.
Declaration
public ScrollViewerRenderMode ScrollViewerRenderMode { get; set; }
Property Value
Type |
---|
ScrollViewerRenderMode |
SelectedItems
Gets or sets the object shows the selected items of the diagram.
Declaration
public object SelectedItems { get; set; }
Property Value
Type |
---|
System.Object |
SelectorChangedCommand
Gets or sets the selectorchangedcommand to invoke when the selection with their porperty value is changed.
Declaration
public ICommand SelectorChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
SelectorHandleDisplayMode
Gets or sets the display mode for the handle of the selector.
Declaration
public SelectorHandleDisplayMode SelectorHandleDisplayMode { get; set; }
Property Value
Type |
---|
SelectorHandleDisplayMode |
SingleSelectionMode
Gets or sets the selection behavior of diagram elements either single select or toggle select.
Declaration
public SingleSelectionMode SingleSelectionMode { get; set; }
Property Value
Type |
---|
SingleSelectionMode |
SnapSettings
Gets or sets the SnapSettings of the Diagram.
Declaration
public SnapSettings SnapSettings { get; set; }
Property Value
Type |
---|
SnapSettings |
SwimlaneChildChangedCommand
Gets or sets the SwimlaneChildchangedcommand to invoke when the SwimlaneChild is changed.
Declaration
public ICommand SwimlaneChildChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |
Swimlanes
Gets or sets the ISwimlane collection of the diagram.
Declaration
public object Swimlanes { get; set; }
Property Value
Type |
---|
System.Object |
Theme
Gets or sets the theme to a collection of property settings that allow you to define the look of diagram elements.
Declaration
public DiagramTheme Theme { get; set; }
Property Value
Type |
---|
DiagramTheme |
Tool
Gets or sets the desired drawing tool of the diagram.
Declaration
public Tool Tool { get; set; }
Property Value
Type |
---|
Tool |
VerticalRuler
Gets or sets the vertical ruler of the diagram.
Declaration
public Ruler VerticalRuler { get; set; }
Property Value
Type |
---|
Ruler |
ViewPortChangedCommand
Gets or sets the viewportchangedcommand to invoke when the diagram bounds is changed.
Declaration
public ICommand ViewPortChangedCommand { get; set; }
Property Value
Type |
---|
System.Windows.Input.ICommand |