DiagramEditorControl
Graphical component for editing CompositionDiagramElement.
Inherits: UserControl
Implements: IPersistable, IUndoRedoManager, IComponentConnector
Constructors
public DiagramEditorControl()
diagramEditorControl = DiagramEditorControl()
Initializes a new instance of the DiagramEditorControl.
Properties
public CompositionDiagramElement Composition { get; set; }
value = diagramEditorControl.Composition
diagramEditorControl.Composition = value
Composite element.
public IDictionary<Type, IDoubleClickHandler> DoubleClickHandlers { get; }
value = diagramEditorControl.DoubleClickHandlers
Double-click element handlers.
public ICommand HelpCommand { get; set; }
value = diagramEditorControl.HelpCommand
diagramEditorControl.HelpCommand = value
Help command.
public bool IsEncrypted { get; set; }
value = diagramEditorControl.IsEncrypted
diagramEditorControl.IsEncrypted = value
Is encrypted.
public bool IsReadOnly { get; set; }
value = diagramEditorControl.IsReadOnly
diagramEditorControl.IsReadOnly = value
Read-only mode.
public ICommand OpenElementCommand { get; set; }
value = diagramEditorControl.OpenElementCommand
diagramEditorControl.OpenElementCommand = value
Command for opening composition element.
public ICommand OpenPropertiesCommand { get; set; }
value = diagramEditorControl.OpenPropertiesCommand
diagramEditorControl.OpenPropertiesCommand = value
Command for opening element properties.
public ICommand RedoCommand { get; set; }
value = diagramEditorControl.RedoCommand
diagramEditorControl.RedoCommand = value
Redo command.
public ICommand RemoveCommand { get; set; }
value = diagramEditorControl.RemoveCommand
diagramEditorControl.RemoveCommand = value
Remove command.
public double Scale { get; set; }
value = diagramEditorControl.Scale
diagramEditorControl.Scale = value
Scale.
public DiagramElement SelectedElement { get; set; }
value = diagramEditorControl.SelectedElement
diagramEditorControl.SelectedElement = value
Selected element.
public IEnumerable<DiagramElement> SelectedElements { get; set; }
value = diagramEditorControl.SelectedElements
diagramEditorControl.SelectedElements = value
Selected elements.
public bool ShowOverview { get; set; }
value = diagramEditorControl.ShowOverview
diagramEditorControl.ShowOverview = value
To show the review panel.
public ICommand UndoCommand { get; set; }
value = diagramEditorControl.UndoCommand
diagramEditorControl.UndoCommand = value
Undo command.
Methods
public CompositionDiagramElement GetSelectionCopyElement()
result = diagramEditorControl.GetSelectionCopyElement()
To create a new element from the selected elements in the diagram.
Returns: Composite element.
public void InitializeComponent()
diagramEditorControl.InitializeComponent()
InitializeComponent
public void Load(SettingsStorage storage)
diagramEditorControl.Load(storage)
Load settings.
- storage
- Settings storage.
public void Save(SettingsStorage storage)
diagramEditorControl.Save(storage)
Save settings.
- storage
- Settings storage.
public void SaveToImage(Stream file)
diagramEditorControl.SaveToImage(file)
To save the diagram as an image.
- file
- The content of file.
public void Select(DiagramElement element)
diagramEditorControl.Select(element)
Select element.
- element
Events
public event Action<DiagramElement> ElementDoubleClicked
diagramEditorControl.ElementDoubleClicked += handler
The event of the double click on the diagram element.
public event Action<DiagramElement> SelectionChanged
diagramEditorControl.SelectionChanged += handler
The event of the element selection on the diagram.
public event Action<DiagramSocket, MouseAction> SocketClicked
diagramEditorControl.SocketClicked += handler
Socket clicked event.
Fields
public static readonly DependencyProperty CompositionProperty
value = DiagramEditorControl.CompositionProperty
DependencyProperty for Composition.
public static readonly DependencyProperty HelpCommandProperty
value = DiagramEditorControl.HelpCommandProperty
DependencyProperty for HelpCommand.
public static readonly DependencyProperty OpenElementCommandProperty
value = DiagramEditorControl.OpenElementCommandProperty
DependencyProperty for OpenElementCommand.
public static readonly DependencyProperty OpenPropertiesCommandProperty
value = DiagramEditorControl.OpenPropertiesCommandProperty
DependencyProperty for OpenPropertiesCommand.
public static readonly DependencyProperty RedoCommandProperty
value = DiagramEditorControl.RedoCommandProperty
DependencyProperty for RedoCommand.
public static readonly DependencyProperty RemoveCommandProperty
value = DiagramEditorControl.RemoveCommandProperty
DependencyProperty for RemoveCommand.
public static readonly DependencyProperty ScaleProperty
value = DiagramEditorControl.ScaleProperty
DependencyProperty for Scale.
public static readonly DependencyProperty ShowOverviewProperty
value = DiagramEditorControl.ShowOverviewProperty
DependencyProperty for ShowOverview.
public static readonly DependencyProperty UndoCommandProperty
value = DiagramEditorControl.UndoCommandProperty
DependencyProperty for UndoCommand.