DiagramViewModel

StockSharp.Xaml.Diagram.Maui

ViewModel para el lector/editor de diagramas.

Hereda de: NotifiableObject

Propiedades

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

Tamaño de la caña, actualizado desde DiagramPage.SizeChanged.

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

Consigue el envoltorio de comandos ClearSelection.

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

Obtiene o establece la propiedad de Composition observable.

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

Consigue que el comando envuelva Copia.

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

Consigue que el comando envolver Cut.

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

Consigue el comando envolviendo Eliminar.

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

El sorteo para GraphicsView.

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

Consigue el estado del editor.

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

Obtiene o establece la propiedad ErrorMessageobservable.

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

Consigue el envoltorio de comandos FitToView.

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

Ya sea que una composición esté cargada.

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

Obtiene o establece la propiedad IsDirtyobservable.

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

Obtiene o establece la propiedad IsEditingobservable.

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

Obtiene o establece la propiedad PanXobservable.

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

Obtiene o establece la propiedad PanYobservable.

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

Consigue el comando envolviendo Paste.

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

Consigue el comando envolviendo a Redo.

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

Consigue el envoltorio de comandos ResetView.

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

Consigue el envoltorio de comandos SelectAll.

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

Obtiene o establece la propiedad SelectedElementobservable.

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

Consigue el modelo de selección.

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

Título de la página.

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

Consigue el comando envolviendo Deshacer.

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

Obtiene o establece la propiedad Zoom observable.

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

Consigue el envoltorio de comandos ZoomIn.

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

Consigue el envoltorio de comandos ZoomOut.

Métodos

CancelLinkCreation
public void CancelLinkCreation()
diagramViewModel.CancelLinkCreation()

Cancelar creación de enlaces.

CancelNodeDrag
public void CancelNodeDrag()
diagramViewModel.CancelNodeDrag()

Cancelar arrastrar nodos y restaurar la posición original.

CancelPaletteDrag
public void CancelPaletteDrag()
diagramViewModel.CancelPaletteDrag()

Cancelar la paleta de arrastre.

ClearSelection
private void ClearSelection()
diagramViewModel.ClearSelection()

Selección clara.

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

Creación de enlaces completos a la toma de objetivo.

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

Completa la paleta arrastrar y crear nuevo nodo.

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

Continuar arrastrando un nodo o varios nodos.

Copy
private void Copy()
diagramViewModel.Copy()

Copiar elementos seleccionados para el portapapeles.

Cut
private void Cut()
diagramViewModel.Cut()

Cortar elementos seleccionados para el portapapeles.

Delete
private void Delete()
diagramViewModel.Delete()

Eliminar elementos seleccionados.

EndNodeDrag
public void EndNodeDrag()
diagramViewModel.EndNodeDrag()

Fin de la arrastrada de nodos.

FitToView
private void FitToView()
diagramViewModel.FitToView()

Fitar diagrama para ver.

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

Consiga todas las tomas compatibles para la fuente de conexión actual.

Invalidate
public void Invalidate()
diagramViewModel.Invalidate()

Solicita lona rociada.

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

Cargar datos del diagrama de un archivo. Nota: Esto sólo devuelve la estructura de datos. Usar la carga de composición para la restauración completa.

filePath
La ruta del archivo para cargar.

Devuelve: Datos de archivo de diagrama, o nulo si no es válido.

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

Cargar datos del diagrama de un flujo. Nota: Esto sólo devuelve la estructura de datos. Usar la carga de composición para la restauración completa.

stream
El arroyo de donde leer.

Devuelve: Datos de archivo de diagrama, o nulo si no es válido.

NotifyClipboardChanged
public void NotifyClipboardChanged()
diagramViewModel.NotifyClipboardChanged()

Notificar cambios de estado de comando portapapeles.

NotifyUndoRedoChanged
public void NotifyUndoRedoChanged()
diagramViewModel.NotifyUndoRedoChanged()

Notificar que el estado de deshacer/redo puede haber cambiado.

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

Maneja el gesto de lata.

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

Maneja el gesto de pellizco.

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

Pulsera de mano en las coordenadas de pantalla.

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

Grifo de manija con modificador para multi-seleccion.

Paste
private void Paste()
diagramViewModel.Paste()

Elementos de sabor de cartón.

Redo
private void Redo()
diagramViewModel.Redo()

Redona la última acción sin hacer.

ResetView
private void ResetView()
diagramViewModel.ResetView()

Reiniciar zoom y pan a defecto.

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

Guarda el diagrama a un archivo.

filePath
La ruta del archivo a la que salvar.
SaveToStream
public void SaveToStream(Stream stream)
diagramViewModel.SaveToStream(stream)

Guarda el diagrama a un flujo.

stream
El arroyo a quien escribir.
SaveToString
public string SaveToString()
result = diagramViewModel.SaveToString()

Guarda el diagrama a una cadena JSON.

Devuelve: Representación JSON del diagrama.

SelectAll
private void SelectAll()
diagramViewModel.SelectAll()

Seleccione todos los elementos.

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

Seleccione todos los nodos dentro de un rectángulo de pantalla-espacio (selección de banda de duplicado).

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

Establece el callback de invalidación de tela.

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

Empieza a crear un enlace desde un socket.

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

Comience a arrastrar un nodo (o múltiple si el nodo está en una selección múltiple).

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

Comience a arrastrar un elemento de la paleta.

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

Trate de crear un nuevo elemento en la posición especificada.

Undo
private void Undo()
diagramViewModel.Undo()

Deshacer la última acción.

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

Actualizar el punto final de creación de enlaces.

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

Actualizar el estado de validación de mangueras.

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

Actualizar la posición de arrastre de paleta.

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

Compruebe si añadir un enlace crearía un ciclo en el gráfico.

ZoomIn
private void ZoomIn()
diagramViewModel.ZoomIn()

Acércate en un 25%.

ZoomOut
private void ZoomOut()
diagramViewModel.ZoomOut()

Apague un 25%.