LayoutManager

StockSharp.Xaml.Diagram.GXDiagram

This class is responsible for automatically positioning all nodes in the diagram.

Inherits: FrameworkElement

Constructors

LayoutManager()

The constructor for the standard layout manager that is the initial value of LayoutManager.

Properties

Animated : bool

Gets or sets whether there should be animated motion moving the nodes from their current positions to their laid out positions.

AnimationDisablesDiagram : bool

Gets or sets whether the Diagram is disabled during a layout animation.

AnimationTime : int

Gets or sets the time in milliseconds that any animation should take.

DefaultLocation : Point

Gets or sets the location from which unpositioned nodes appear at the start of the animation.

Diagram : Diagram

Gets the Diagram for which this LayoutManager performs automatic layouts.

Initial : LayoutInitial

Gets or sets under what conditions an "initialization" or "reset" of the model should cause layouts to be invalidated.

SkipsInvalidate : bool

Gets or sets whether LayoutChange) should do nothing when a part is added/removed/changed.

Methods

CanLayoutPart(Part, IDiagramLayout) : bool

This predicate decides whether a Part should participate in an IDiagramLayout's layout.

p
a Node or Link
lay
the layout that might be responsible for positioning the part

Returns: True if the part is visible and if the part's LayoutId is not "None" and is either "All" or the same value as the layout's Id. False for all Adornments and for all Nodes that are IsLinkLabel, and for all Groups that have no Layout.

InvalidateLayout(Part, LayoutChange)

Declare that the IDiagramLayout including a given Part is now invalid and may need to be performed again soon.

p
must be a Part
change
a hint on the reason for the need for a new layout; this is used to decide whether a layout is really needed.
LayoutDiagram(LayoutInitial, bool)

Request a re-layout of all invalidated layouts in this diagram.

init
If the value is InvalidateAll, all IDiagramLayouts will be declared invalid, and they will all be performed at the time given by the argument. If the value is InvalidateIfNodesUnlocated, IDiagramLayouts will be declared invalid only if they are responsible for Nodes that do not have a Location, because their X and/or Y values are Double.NaN. If the value is ValidateAll, all IDiagramLayouts will be declared valid, and no layout will occur until after something else happens to invalidate a layout. If the value is None, no layout validity is changed -- any invalid layouts will be performed at the specified time.
immediate
If true this method performs an immediate layout. If false this method schedules a layout to occur soon.
LayoutDiagram()

Request a re-layout of all of the nodes and links in this diagram.

MoveAnimated(Node, Point)

This basically just sets the value of Position, but with animated movement.

node
newpos
a new position in model coordinates
PerformLayout()

This method is called asynchronously in order to layout a Diagram.

Fields

AnimatedProperty : DependencyProperty

Identifies the Animated dependency property.

AnimationDisablesDiagramProperty : DependencyProperty

Identifies the AnimationDisablesDiagram dependency property.

AnimationTimeProperty : DependencyProperty

Identifies the AnimationTime dependency property.

DefaultLocationProperty : DependencyProperty

Identifies the DefaultLocation dependency property.

InitialProperty : DependencyProperty

Identifies the Initial dependency property.