ChartModifierSurface

StockSharp.Xaml.Charting.Visuals

Defines the ChartModifierSurface, which acts as an overlay Canvas on top of the UltrachartSurface for drawing annotations,

Inherits: ContentControl

Implements: IChartModifierSurface, IHitTestable

Constructors

ChartModifierSurface
public ChartModifierSurface()
chartModifierSurface = ChartModifierSurface()

Initializes a new instance of the ChartModifierSurface class.

Properties

Children
public ObservableCollection<UIElement> Children { get; }
value = chartModifierSurface.Children

Gets the collection of UIElement children drawn on the canvas over the top of the UltrachartSurface

ClipToBounds
public bool ClipToBounds { get; set; }
value = chartModifierSurface.ClipToBounds
chartModifierSurface.ClipToBounds = value

Gets or sets whether UIElements added to the ModifierSurface should clip to bounds or not

Methods

Clear
public void Clear()
chartModifierSurface.Clear()

Clears all children off the IChartModifierSurface

GetBoundsRelativeTo
public Rect GetBoundsRelativeTo(IHitTestable relativeTo)
result = chartModifierSurface.GetBoundsRelativeTo(relativeTo)

Gets the bounds of the current IHitTestable element relative to another IHitTestable element

relativeTo
The relative to.
IsPointWithinBounds
public bool IsPointWithinBounds(Point point)
result = chartModifierSurface.IsPointWithinBounds(point)

Returns true if the Point is within the bounds of the current IHitTestable element

point
The point to test, translated relative to RootGrid

Returns: true if the Point is within the bounds

TranslatePoint
public Point TranslatePoint(Point point, IHitTestable relativeTo)
result = chartModifierSurface.TranslatePoint(point, relativeTo)

Translates the point relative to the other IHitTestable element

point
The input point relative to this IHitTestable
relativeTo
The other IHitTestable to use when transforming the point

Returns: The transformed Point

Fields

ClipToBoundsProperty
public static readonly DependencyProperty ClipToBoundsProperty
value = ChartModifierSurface.ClipToBoundsProperty

Defines the ClipToBounds DependencyProperty