DiagramEditorControl
StockSharp.Xaml.Diagram
用于编辑 CompositionDiagramElement 的图形组件 。
继承自: UserControl
实现: IPersistable, IUndoRedoManager, IComponentConnector
构造函数
DiagramEditorControl
public DiagramEditorControl()
diagramEditorControl = DiagramEditorControl()
初始化了 & ##DiagramEditorControl+#的新实例.
属性
Composition
public CompositionDiagramElement Composition { get; set; }
value = diagramEditorControl.Composition
diagramEditorControl.Composition = value
复合元素.
DoubleClickHandlers
public IDictionary<Type, IDoubleClickHandler> DoubleClickHandlers { get; }
value = diagramEditorControl.DoubleClickHandlers
双击元素处理器 。
HelpCommand
public ICommand HelpCommand { get; set; }
value = diagramEditorControl.HelpCommand
diagramEditorControl.HelpCommand = value
帮助指挥。
IsEncrypted
public bool IsEncrypted { get; set; }
value = diagramEditorControl.IsEncrypted
diagramEditorControl.IsEncrypted = value
加密了 已经加密了
IsReadOnly
public bool IsReadOnly { get; set; }
value = diagramEditorControl.IsReadOnly
diagramEditorControl.IsReadOnly = value
唯读模式 。
OpenElementCommand
public ICommand OpenElementCommand { get; set; }
value = diagramEditorControl.OpenElementCommand
diagramEditorControl.OpenElementCommand = value
启动成分元素的命令 。
OpenPropertiesCommand
public ICommand OpenPropertiesCommand { get; set; }
value = diagramEditorControl.OpenPropertiesCommand
diagramEditorControl.OpenPropertiesCommand = value
打开元素属性的命令 。
RedoCommand
public ICommand RedoCommand { get; set; }
value = diagramEditorControl.RedoCommand
diagramEditorControl.RedoCommand = value
复取所领.
RemoveCommand
public ICommand RemoveCommand { get; set; }
value = diagramEditorControl.RemoveCommand
diagramEditorControl.RemoveCommand = value
删除命令 。
Scale
public double Scale { get; set; }
value = diagramEditorControl.Scale
diagramEditorControl.Scale = value
规模。
SelectedElement
public DiagramElement SelectedElement { get; set; }
value = diagramEditorControl.SelectedElement
diagramEditorControl.SelectedElement = value
选中元素 。
SelectedElements
public IEnumerable<DiagramElement> SelectedElements { get; set; }
value = diagramEditorControl.SelectedElements
diagramEditorControl.SelectedElements = value
所选元素.
ShowOverview
public bool ShowOverview { get; set; }
value = diagramEditorControl.ShowOverview
diagramEditorControl.ShowOverview = value
以示审阅.
UndoCommand
public ICommand UndoCommand { get; set; }
value = diagramEditorControl.UndoCommand
diagramEditorControl.UndoCommand = value
撤销命令 。
方法
GetSelectionCopyElement
public CompositionDiagramElement GetSelectionCopyElement()
result = diagramEditorControl.GetSelectionCopyElement()
从图中选定的元素创建新元素。
返回值: 复合元素.
InitializeComponent
public void InitializeComponent()
diagramEditorControl.InitializeComponent()
InitializeComponent
Load
public void Load(SettingsStorage storage)
diagramEditorControl.Load(storage)
装入设置 。
- storage
- 设置存储 。
Save
public void Save(SettingsStorage storage)
diagramEditorControl.Save(storage)
保存设置 。
- storage
- 设置存储 。
SaveToImage
public void SaveToImage(Stream file)
diagramEditorControl.SaveToImage(file)
将图保存为图像 。
- file
- 文件内容.
Select
public void Select(DiagramElement element)
diagramEditorControl.Select(element)
选择元素 。
- element
事件
ElementDoubleClicked
public event Action<DiagramElement> ElementDoubleClicked
diagramEditorControl.ElementDoubleClicked += handler
双击图元素的事件 。
SelectionChanged
public event Action<DiagramElement> SelectionChanged
diagramEditorControl.SelectionChanged += handler
图表上的元素选择事件。
SocketClicked
public event Action<DiagramSocket, MouseAction> SocketClicked
diagramEditorControl.SocketClicked += handler
点击了 Socket 事件 。
字段
CompositionProperty
public static readonly DependencyProperty CompositionProperty
value = DiagramEditorControl.CompositionProperty
DependencyProperty for Composition.
HelpCommandProperty
public static readonly DependencyProperty HelpCommandProperty
value = DiagramEditorControl.HelpCommandProperty
DependencyProperty 为HelpCommand.
OpenElementCommandProperty
public static readonly DependencyProperty OpenElementCommandProperty
value = DiagramEditorControl.OpenElementCommandProperty
DependencyProperty 为OpenElementCommand.
OpenPropertiesCommandProperty
public static readonly DependencyProperty OpenPropertiesCommandProperty
value = DiagramEditorControl.OpenPropertiesCommandProperty
DependencyProperty 为OpenPropertiesCommand.
RedoCommandProperty
public static readonly DependencyProperty RedoCommandProperty
value = DiagramEditorControl.RedoCommandProperty
DependencyProperty 为RedoCommand.
RemoveCommandProperty
public static readonly DependencyProperty RemoveCommandProperty
value = DiagramEditorControl.RemoveCommandProperty
DependencyProperty 为RemoveCommand.
ScaleProperty
public static readonly DependencyProperty ScaleProperty
value = DiagramEditorControl.ScaleProperty
DependencyProperty==缩放
ShowOverviewProperty
public static readonly DependencyProperty ShowOverviewProperty
value = DiagramEditorControl.ShowOverviewProperty
DependencyProperty 为ShowOverview.
UndoCommandProperty
public static readonly DependencyProperty UndoCommandProperty
value = DiagramEditorControl.UndoCommandProperty
DependencyProperty 为UndoCommand.