DiagramLayout

StockSharp.Xaml.Diagram.GXDiagram.Layout

DiagramLayout is the base class for all of the predefined specific layout implementations.

Inherits: FrameworkElement

Implements: IDiagramLayout

Constructors

DiagramLayout
public DiagramLayout()
diagramLayout = DiagramLayout()

Create a DiagramLayout that is invalidated only under the Standard conditions.

DiagramLayout
protected DiagramLayout(DiagramLayout layout)
diagramLayout = DiagramLayout(layout)

Help making a copy of a DiagramLayout.

layout

Properties

ArrangementOrigin
public Point ArrangementOrigin { get; set; }
value = diagramLayout.ArrangementOrigin
diagramLayout.ArrangementOrigin = value

Gets or sets the point of the top-left node.

Conditions
public LayoutChange Conditions { get; set; }
value = diagramLayout.Conditions
diagramLayout.Conditions = value

Gets or sets the LayoutChange conditions for which Part) will set ValidLayout to false.

Diagram
public Diagram Diagram { get; set; }
value = diagramLayout.Diagram
diagramLayout.Diagram = value

Gets or sets a reference to the owner Diagram.

Group
public Group Group { get; set; }
value = diagramLayout.Group
diagramLayout.Group = value

Gets or sets a reference to the owner Group, if any.

Id
public string Id { get; set; }
value = diagramLayout.Id
diagramLayout.Id = value

Gets or sets an identifier for a particular layout.

ValidLayout
public bool ValidLayout { get; set; }
value = diagramLayout.ValidLayout
diagramLayout.ValidLayout = value

Gets or sets whether this layout is valid; if not, the LayoutManager will call Link}) sometime in order to make sure the layout is valid.

Methods

CanLayoutPart
public virtual bool CanLayoutPart(Part part)
result = diagramLayout.CanLayoutPart(part)

Decide whether a given Part should participate in this layout.

part

Returns: Typically this should return false if the part is not visible, if the part is in a temporary Layer, or if the part's LayoutId is "None". This should return true if the part's LayoutId is "All" or if it matches the Id of this layout.

DoLayout
public virtual void DoLayout(IEnumerable<Node> nodes, IEnumerable<Link> links)
diagramLayout.DoLayout(nodes, links)

Position all nodes that do not have an assigned Location in the manner of a simple rectangular array.

nodes
links
Invalidate
public virtual void Invalidate(LayoutChange reason, Part part)
diagramLayout.Invalidate(reason, part)

Declare that this layout might no longer be valid, depending on the change and the Conditions.

reason
A LayoutChange hint describing what change may have made the layout invalid. If the value is All, ValidLayout will be set to false unconditionally.
part
the Part that has changed
InvalidateLayout
public void InvalidateLayout()
diagramLayout.InvalidateLayout()

Set the ValidLayout property to false, and ask the diagram's LayoutManager to perform layouts in the near future.

Fields

ArrangementOriginProperty
public static readonly DependencyProperty ArrangementOriginProperty
value = DiagramLayout.ArrangementOriginProperty

Identifies the ArrangementOrigin dependency property.

IdProperty
public static readonly DependencyProperty IdProperty
value = DiagramLayout.IdProperty

Identifies the Id dependency property.