CommandHandler

StockSharp.Xaml.Diagram.GXDiagram

This class implements the handlers for all of the standard diagram commands.

Herda de: FrameworkElement

Propriedades

ClipboardBitmap : bool

Gets or sets whether IDataCollection) also adds a bitmap of the area of the selected parts to the system clipboard. [WPF only]

CopyCommand : ICommand

Gets a non-routed ICommand that executes Copy and is enabled by CanCopy.

CopyingInclusions : EffectiveCollectionInclusions

Gets or sets whether Copy deletes only the selected parts or subtrees of selected nodes as well.

CutCommand : ICommand

Gets a non-routed ICommand that executes Cut and is enabled by CanCut.

DecreaseZoomCommand : ICommand

Gets a non-routed parameterized ICommand that executes Object) and is enabled by Object).

DeleteCommand : ICommand

Gets a non-routed ICommand that executes Delete and is enabled by CanDelete.

DeletingInclusions : EffectiveCollectionInclusions

Gets or sets whether Delete deletes only the selected parts or subtrees of selected nodes as well.

Diagram : Diagram

Gets the Diagram for which this CommandHandler executes commands.

EditCommand : ICommand

Gets a non-routed ICommand that executes Edit and is enabled by CanEdit.

GroupCommand : ICommand

Gets a non-routed ICommand that executes Group and is enabled by CanGroup.

IncreaseZoomCommand : ICommand

Gets a non-routed parameterized ICommand that executes Object) and is enabled by Object).

PasteCommand : ICommand

Gets a non-routed ICommand that executes Paste and is enabled by CanPaste.

PrintCommand : ICommand

Gets a non-routed ICommand that executes Print and is enabled by CanPrint.

PrototypeGroup : object

Gets or sets a data value to be copied for a new group node by Group. In order to enable the Group command, set this property to an instance of a node data object that will be represented by a Group.

RedoCommand : ICommand

Gets a non-routed ICommand that executes Redo and is enabled by CanRedo.

SelectAllCommand : ICommand

Gets a non-routed ICommand that executes SelectAll and is enabled by CanSelectAll.

UndoCommand : ICommand

Gets a non-routed ICommand that executes Undo and is enabled by CanUndo.

UngroupCommand : ICommand

Gets a non-routed ICommand that executes Ungroup and is enabled by CanUngroup.

ZoomCommand : ICommand

Gets a non-routed parameterized ICommand that executes Object) and is enabled by Object).

ZoomFactor : double

Gets or sets the factor by which zooming occurs.

ZoomToFitCommand : ICommand

Gets a non-routed ICommand that executes ZoomToFit and is enabled by CanZoomToFit.

Métodos

AddStandardBindings()

Define the standard CommandBindings and InputBindings for all of the predefined diagram Commands. [WPF only]

CanCopy() : bool

This overridable predicate controls whether or not the Copy command is executed.

Retorna: by default, this returns true if AllowCopy is true, if AllowClipboard is true, and if there are some selected parts (SelectedParts).

CanCut() : bool

This overridable predicate controls whether or not the Cut command is executed.

Retorna: by default, this returns true if the diagram is not IsReadOnly, if AllowCopy is true, if AllowDelete is true, if AllowClipboard is true, if there are some selected parts (SelectedParts), and if the model is Modifiable.

CanDecreaseZoom(object) : bool

This overridable predicate controls whether or not the DecreaseZoom command is executed.

param
the factor by which to decrease the zoom; this defaults to 5% (1/ZoomFactor)

Retorna: by default, this returns true if AllowZoom is true, and if the is a value greater than zero.

CanDelete() : bool

This overridable predicate controls whether or not the Delete command is executed.

Retorna: by default, this returns true if the diagram is not IsReadOnly, if AllowDelete is true, and if there are some selected parts (SelectedParts).

CanEdit() : bool

This overridable predicate controls whether or not the Edit command is executed.

Retorna: By default, this returns true: if the diagram is not IsReadOnly, if AllowEdit is true, if there are any selected parts that can be CanEdit'ed, and if there is a TextEditingTool.

CanGroup() : bool

This overridable predicate controls whether or not the Group command is executed.

Retorna: By default, this returns true: if the PrototypeGroup data is not null, if the diagram is not IsReadOnly, if AllowInsert is true, if AllowGroup is true, if the model is an ISubGraphModel that is modifiable, and if there are any selected nodes that can be CanGroup'ed.

CanIncreaseZoom(object) : bool

This overridable predicate controls whether or not the IncreaseZoom command is executed.

param
the factor by which to increase the zoom; this defaults to 5% (ZoomFactor)

Retorna: by default, this returns true if AllowZoom is true, and if the is a value greater than zero.

CanPaste() : bool

This overridable predicate controls whether or not the Paste command is executed.

Retorna: by default, this returns true if the diagram is not IsReadOnly, if AllowInsert is true, if AllowClipboard is true, if the clipboard has data of the format given by the diagram's model's DataFormat, and if the model is Modifiable.

CanPrint() : bool

This overridable predicate controls whether or not the Print command is executed.

Retorna: By default, this returns true if AllowPrint is true and there is a PrintManager.

CanRedo() : bool

This overridable predicate controls whether or not the Redo command is executed.

Retorna: by default, this returns true if the diagram is not IsReadOnly, if AllowUndo is true, and if the diagram's model's UndoManagerCanRedo predicate returns true.

CanSelectAll() : bool

This overridable predicate controls whether or not the SelectAll command is executed.

Retorna: by default, this returns true if AllowSelect is true.

CanStopCommand() : bool

This overridable predicate controls whether or not the StopCommand is executed.

Retorna: by default, this returns true

CanUndo() : bool

This overridable predicate controls whether or not the Undo command is executed.

Retorna: by default, this returns true if the diagram is not IsReadOnly, if AllowUndo is true, and if the diagram's model's UndoManagerCanUndo predicate returns true.

CanUngroup() : bool

This overridable predicate controls whether or not the Ungroup command is executed.

Retorna: by default, this returns true if the diagram is not IsReadOnly, if AllowDelete is true, if AllowUngroup is true, if the model is an ISubGraphModel that is modifiable, and if there are any selected Groups that can be CanUngroup'ed.

CanZoom(object) : bool

This overridable predicate controls whether or not the Zoom command is executed.

param
the new Scale value; this defaults to 1

Retorna: by default, this returns true if AllowZoom is true, and if the is a value greater than zero.

CanZoomToFit() : bool

This overridable predicate controls whether or not the ZoomToFit command is executed.

Retorna: by default, this returns true if AllowZoom is true.

Copy()

Copy the currently SelectedParts from the Diagram into the clipboard.

CopyToClipboard(IDataCollection)

This writes the given data collection to the clipboard using the diagram's model's DataFormat.

coll
Cut()

Execute a Copy followed by a Delete.

DecreaseZoom(object)

Decrease the Diagram.Panel.Scale by the given factor.

param
The factor by which to decrease the zoom. This should be less than one but greater than zero; it defaults to 5% (1/ZoomFactor).
Delete()

Delete the currently SelectedParts from the Diagram.

DoKeyDown(KeyEventArgs)

This is called by the ToolManager.

e
DoKeyUp(KeyEventArgs)

This is called by the ToolManager.

e
Edit()

Start in-place editing of the first TextBlock of the selected part.

Group()

Create a new group node and add the selected parts to that new group.

IncreaseZoom(object)

Increase the Diagram.Panel.Scale by the given factor.

param
The factor by which to increase the zoom. This should be greater than one; it defaults to 5% (ZoomFactor).
Paste()

Copy the contents of the clipboard as new nodes and links in this diagram, and make those new parts the new selection.

PasteFromClipboard() : IDataCollection

This reads a data collection from the clipboard using the diagram's model's DataFormat.

Retorna: null if the Clipboard does not contain any data of the given format

Print()

Print the diagram by showing a PrintDialog and then calling the PrintManager's PrintDialog) method.

RaiseEvent(RoutedEvent) : bool

This method just calls UIElement.RaiseEvent on the Diagram and returns whether the event was handled.

evt

Retorna: true if the event was raised and it was Handled

Redo()

Call Diagram.Model.UndoManager.Redo.

RemoveStandardBindings()

Remove all of the standard diagram command bindings and input bindings. [WPF only]

SelectAll()

Select all of the Nodes and Links in the Diagram.

StopCommand()

Cancel the operation of the current CurrentTool.

Undo()

Call Diagram.Model.UndoManager.Undo.

Ungroup()

For each selected node that is a group, remove the group without removing its members from the diagram.

Zoom(object)

Set the Scale property of the Panel to the given value.

param
The new scale value. This should be greater than zero; it defaults to 1.
ZoomToFit()

Change the Scale such that the whole diagram/document fits into the viewport; or if this command had just executed before, restore the original viewport.

Campos

ClipboardBitmapProperty : DependencyProperty

Identifies the ClipboardBitmap dependency property. [WPF only]

CopyingInclusionsProperty : DependencyProperty

Identifies the CopyingInclusions dependency property.

DeletingInclusionsProperty : DependencyProperty

Identifies the DeletingInclusions dependency property.

PrototypeGroupProperty : DependencyProperty

Identifies the PrototypeGroup dependency property.

ZoomFactorProperty : DependencyProperty

Identifies the ZoomFactor dependency property.