DiagramViewModel

StockSharp.Xaml.Diagram.Maui

ViewModel for diagram viewer/editor.

继承自: NotifiableObject

属性

CanvasSize
public SizeF CanvasSize { get; set; }
value = diagramViewModel.CanvasSize
diagramViewModel.CanvasSize = value

相机大小 从相机的相机上更新

ClearSelectionCommand
public DelegateCommand ClearSelectionCommand { get; }
value = diagramViewModel.ClearSelectionCommand

获得命令包 * ClearSelection % 。

Composition
public CompositionDiagramElement Composition { get; set; }
value = diagramViewModel.Composition
diagramViewModel.Composition = value

获取或设置可观察到的属性。

CopyCommand
public DelegateCommand CopyCommand { get; }
value = diagramViewModel.CopyCommand

获得命令包抄。

CutCommand
public DelegateCommand CutCommand { get; }
value = diagramViewModel.CutCommand

获得命令包接剪接。

DeleteCommand
public DelegateCommand DeleteCommand { get; }
value = diagramViewModel.DeleteCommand

获得命令包接删除。

Drawable
public DiagramCanvasDrawable Drawable { get; }
value = diagramViewModel.Drawable

The drawable for GraphicsView.

EditorState
public DiagramEditorState EditorState { get; }
value = diagramViewModel.EditorState

获得编辑州.

ErrorMessage
public string ErrorMessage { get; set; }
value = diagramViewModel.ErrorMessage
diagramViewModel.ErrorMessage = value

获取或设置可观测属性 。

FitToViewCommand
public DelegateCommand FitToViewCommand { get; }
value = diagramViewModel.FitToViewCommand

获得命令包 * FitToView % 。

HasComposition
public bool HasComposition { get; }
value = diagramViewModel.HasComposition

是否装入了组装 。

IsDirty
public bool IsDirty { get; set; }
value = diagramViewModel.IsDirty
diagramViewModel.IsDirty = value

获取或设置可观测属性 。

IsEditing
public bool IsEditing { get; set; }
value = diagramViewModel.IsEditing
diagramViewModel.IsEditing = value

获取或设置可观测属性 。

PanX
public float PanX { get; set; }
value = diagramViewModel.PanX
diagramViewModel.PanX = value

获取或设置可观测属性 。

PanY
public float PanY { get; set; }
value = diagramViewModel.PanY
diagramViewModel.PanY = value

获取或设置可观测属性 。

PasteCommand
public DelegateCommand PasteCommand { get; }
value = diagramViewModel.PasteCommand

获得命令包贴。

RedoCommand
public DelegateCommand RedoCommand { get; }
value = diagramViewModel.RedoCommand

获得命令包接Redo。

ResetViewCommand
public DelegateCommand ResetViewCommand { get; }
value = diagramViewModel.ResetViewCommand

获得命令包 * ResetView % 。

SelectAllCommand
public DelegateCommand SelectAllCommand { get; }
value = diagramViewModel.SelectAllCommand

获得命令包 * SelectAll % 。

SelectedElement
public DiagramElement SelectedElement { get; set; }
value = diagramViewModel.SelectedElement
diagramViewModel.SelectedElement = value

获取或设置可观测属性 。

Selection
public ISelectionModel Selection { get; }
value = diagramViewModel.Selection

获得选择模式。

Title
public string Title { get; }
value = diagramViewModel.Title

页面标题.

UndoCommand
public DelegateCommand UndoCommand { get; }
value = diagramViewModel.UndoCommand

获得命令来包接撤消。

Zoom
public float Zoom { get; set; }
value = diagramViewModel.Zoom
diagramViewModel.Zoom = value

获取或设置可观察到的缩放属性。

ZoomInCommand
public DelegateCommand ZoomInCommand { get; }
value = diagramViewModel.ZoomInCommand

获得命令包 * ZoomIn % 。

ZoomOutCommand
public DelegateCommand ZoomOutCommand { get; }
value = diagramViewModel.ZoomOutCommand

获得命令包 * ZoomOut % 。

方法

CancelLinkCreation
public void CancelLinkCreation()
diagramViewModel.CancelLinkCreation()

取消链接创建 。

CancelNodeDrag
public void CancelNodeDrag()
diagramViewModel.CancelNodeDrag()

取消节点拖曳并恢复原位置 。

CancelPaletteDrag
public void CancelPaletteDrag()
diagramViewModel.CancelPaletteDrag()

取消调色板拖曳 。

ClearSelection
private void ClearSelection()
diagramViewModel.ClearSelection()

清除选择。

CompleteLinkCreation
public bool CompleteLinkCreation(SocketKey targetSocketKey)
result = diagramViewModel.CompleteLinkCreation(targetSocketKey)

完全链接到目标套接字 。

CompletePaletteDrag
public bool CompletePaletteDrag(float screenX, float screenY)
result = diagramViewModel.CompletePaletteDrag(screenX, screenY)

完全调色板拖动并创建新的节点 。

ContinueNodeDrag
public void ContinueNodeDrag(float diagramX, float diagramY)
diagramViewModel.ContinueNodeDrag(diagramX, diagramY)

继续拖曳一个节点或多个节点.

Copy
private void Copy()
diagramViewModel.Copy()

复制选中的元素到剪贴板 。

Cut
private void Cut()
diagramViewModel.Cut()

剪切选中的元素到剪贴板 。

Delete
private void Delete()
diagramViewModel.Delete()

删除所选元素。

EndNodeDrag
public void EndNodeDrag()
diagramViewModel.EndNodeDrag()

结束节点拖曳.

FitToView
private void FitToView()
diagramViewModel.FitToView()

适合查看图表 。

GetCompatibleSockets
public IEnumerable<SocketKey> GetCompatibleSockets()
result = diagramViewModel.GetCompatibleSockets()

获取当前链接源的所有兼容套接字 。

Invalidate
public void Invalidate()
diagramViewModel.Invalidate()

请求重新绘制画布 。

LoadFromFile
public static DiagramFileData LoadFromFile(string filePath)
result = DiagramViewModel.LoadFromFile(filePath)

从文件中装入图表数据。 注意: 这只返回数据结构。 使用组件装入来进行完全恢复 。

filePath
要从中加载的文件路径 。

返回值: 图表文件数据, 如果无效, 则无效 。

LoadFromStream
public static DiagramFileData LoadFromStream(Stream stream)
result = DiagramViewModel.LoadFromStream(stream)

从流中装入图表数据。 注意: 这只返回数据结构。 使用成分加载来完全恢复 。

stream
溪来从读.

返回值: 图表文件数据, 如果无效, 则无效 。

NotifyClipboardChanged
public void NotifyClipboardChanged()
diagramViewModel.NotifyClipboardChanged()

通知剪贴板命令状态更改 。

NotifyUndoRedoChanged
public void NotifyUndoRedoChanged()
diagramViewModel.NotifyUndoRedoChanged()

通知撤销/重做状态可能已经改变 。

OnPan
public void OnPan(float deltaX, float deltaY)
diagramViewModel.OnPan(deltaX, deltaY)

处理锅手势三角洲。

OnPinch
public void OnPinch(float scale, float focusX, float focusY)
diagramViewModel.OnPinch(scale, focusX, focusY)

手握手势

OnTap
public void OnTap(float screenX, float screenY)
diagramViewModel.OnTap(screenX, screenY)

处理屏幕坐标的自带。

OnTapWithModifier
public void OnTapWithModifier(float screenX, float screenY, bool addToSelection)
diagramViewModel.OnTapWithModifier(screenX, screenY, addToSelection)

多选择的处理自带调试器 。

Paste
private void Paste()
diagramViewModel.Paste()

从剪贴板上粘贴元素 。

Redo
private void Redo()
diagramViewModel.Redo()

重做最后的未完成动作 。

ResetView
private void ResetView()
diagramViewModel.ResetView()

重置缩放和平板到默认值 。

SaveToFile
public void SaveToFile(string filePath)
diagramViewModel.SaveToFile(filePath)

将图表保存到文件 。

filePath
要保存的文件路径 。
SaveToStream
public void SaveToStream(Stream stream)
diagramViewModel.SaveToStream(stream)

将图表保存为流 。

stream
溪来作来作来.
SaveToString
public string SaveToString()
result = diagramViewModel.SaveToString()

将图保存为 JSON 字符串 。

返回值: JSON图的表示.

SelectAll
private void SelectAll()
diagramViewModel.SelectAll()

选择所有元素。

SelectNodesInRect
public void SelectNodesInRect(RectF screenRect)
diagramViewModel.SelectNodesInRect(screenRect)

选择屏幕-空间矩形( 橡胶带选择) 内的所有节点 。

SetInvalidateCallback
public void SetInvalidateCallback(Action invalidate)
diagramViewModel.SetInvalidateCallback(invalidate)

设置画布无效回调 。

StartLinkCreation
public void StartLinkCreation(SocketKey socketKey, float screenX, float screenY)
diagramViewModel.StartLinkCreation(socketKey, screenX, screenY)

开始从套接字创建链接 。

StartNodeDrag
public void StartNodeDrag(string nodeKey, float diagramX, float diagramY)
diagramViewModel.StartNodeDrag(nodeKey, diagramX, diagramY)

开始拖曳一个节点(或者如果节点处于多选状态,则会多次拖曳).

StartPaletteDrag
public void StartPaletteDrag(PaletteItem item, float screenX, float screenY)
diagramViewModel.StartPaletteDrag(item, screenX, screenY)

开始从调色板上拖取元素 。

TryCreateElement
private bool TryCreateElement(PaletteItem item, float x, float y)
result = diagramViewModel.TryCreateElement(item, x, y)

尝试在指定位置创建新元素 。

Undo
private void Undo()
diagramViewModel.Undo()

撤销最后的动作 。

UpdateLinkCreation
public void UpdateLinkCreation(float screenX, float screenY)
diagramViewModel.UpdateLinkCreation(screenX, screenY)

更新链接创建终点 。

UpdateLinkHover
public void UpdateLinkHover(SocketKey hoverSocket)
diagramViewModel.UpdateLinkHover(hoverSocket)

更新链接徘徊验证状态 。

UpdatePaletteDrag
public void UpdatePaletteDrag(float screenX, float screenY, bool isOverCanvas)
diagramViewModel.UpdatePaletteDrag(screenX, screenY, isOverCanvas)

更新调色板拖动位置 。

WouldCreateCycle
private bool WouldCreateCycle(string fromNodeKey, string toNodeKey)
result = diagramViewModel.WouldCreateCycle(fromNodeKey, toNodeKey)

请检查是否添加链接会在图中创建循环 。

ZoomIn
private void ZoomIn()
diagramViewModel.ZoomIn()

放大25%。

ZoomOut
private void ZoomOut()
diagramViewModel.ZoomOut()

缩小25%。