UltrachartSurface

StockSharp.Xaml.Charting.Visuals

Provides a high performance chart surface with a single RenderSurfaceBase viewport for rendering multiple IRenderableSeries, multiple X and Y IAxis instances, with IDataSeries bindings, mulitple ChartModifierBase derived behaviour modifiers and multiple AnnotationBase UIElement Annotations

Inherits: UltrachartSurfaceBase

Implements: IUltrachartSurface, IUltrachartSurfaceBase, ISuspendable, IInvalidatableElement, IUltrachartController, IDisposable, IXmlSerializable

Constructors

UltrachartSurface
internal UltrachartSurface(IServiceContainer mockServices)
ultrachartSurface = UltrachartSurface(mockServices)

Internal Ctor used for tests

mockServices
UltrachartSurface
public UltrachartSurface()
ultrachartSurface = UltrachartSurface()

Initializes a new instance of the UltrachartSurface class.

Properties

AdornerLayerCanvas
public Canvas AdornerLayerCanvas { get; }
value = ultrachartSurface.AdornerLayerCanvas

Gets the Adorner Layer over the chart

AnimateZoomExtentsCommand
public ICommand AnimateZoomExtentsCommand { get; set; }
value = ultrachartSurface.AnimateZoomExtentsCommand
ultrachartSurface.AnimateZoomExtentsCommand = value

Gets or sets the Animate zoom extents command, which when invoked, causes the UltrachartSurface to zoom to extents using animation

AnnotationOverlaySurface
public IAnnotationCanvas AnnotationOverlaySurface { get; }
value = ultrachartSurface.AnnotationOverlaySurface

Gets the Annotation Canvas over the chart

Annotations
public AnnotationCollection Annotations { get; set; }
value = ultrachartSurface.Annotations
ultrachartSurface.Annotations = value

Gets the AnnotationCollection which provides renderable annotations over the UltrachartSurface

AnnotationUnderlaySurface
public IAnnotationCanvas AnnotationUnderlaySurface { get; }
value = ultrachartSurface.AnnotationUnderlaySurface

Gets the Annotation Canvas under the chart

AutoRangeOnStartup
public bool AutoRangeOnStartup { get; set; }
value = ultrachartSurface.AutoRangeOnStartup
ultrachartSurface.AutoRangeOnStartup = value

Gets or sets a value indicating whether Ultrachart will attempt to perform a one-time AutoRange on startup

AxisAreaBottom
public AxisArea AxisAreaBottom { get; }
value = ultrachartSurface.AxisAreaBottom

Gets the Bottom AxisArea, which contains the Axes which have AxisAlignment set to Bottom

AxisAreaLeft
public AxisArea AxisAreaLeft { get; }
value = ultrachartSurface.AxisAreaLeft

Gets the Left AxisArea, which contains the Axes which have AxisAlignment set to Left

AxisAreaRight
public AxisArea AxisAreaRight { get; }
value = ultrachartSurface.AxisAreaRight

Gets the Right AxisArea, which contains the Axes which have AxisAlignment set to Right

AxisAreaTop
public AxisArea AxisAreaTop { get; }
value = ultrachartSurface.AxisAreaTop

Gets the Top AxisArea, which contains the Axes which have AxisAlignment set to Top

BottomAxesPanelTemplate
public ItemsPanelTemplate BottomAxesPanelTemplate { get; set; }
value = ultrachartSurface.BottomAxesPanelTemplate
ultrachartSurface.BottomAxesPanelTemplate = value

Gets or sets the template that defines the panel which controls the layout of bottom-aligned axes

CenterXAxisArea
public AxisArea CenterXAxisArea { get; }
value = ultrachartSurface.CenterXAxisArea

Gets the center AxisArea which contains XAxes with IsCenterAxis flag equals to true

CenterYAxisArea
public AxisArea CenterYAxisArea { get; }
value = ultrachartSurface.CenterYAxisArea

Gets the center AxisArea which contains YAxes with IsCenterAxis flag equals to true

ChartModifier
public IChartModifier ChartModifier { get; set; }
value = ultrachartSurface.ChartModifier
ultrachartSurface.ChartModifier = value

Gets or sets the current ChartModifier, which alters the behaviour of the chart

ClipOverlayAnnotations
public bool ClipOverlayAnnotations { get; set; }
value = ultrachartSurface.ClipOverlayAnnotations
ultrachartSurface.ClipOverlayAnnotations = value

Gets or sets whether annotations over the chart should clip to bounds or not. Default value is True

ClipUnderlayAnnotations
public bool ClipUnderlayAnnotations { get; set; }
value = ultrachartSurface.ClipUnderlayAnnotations
ultrachartSurface.ClipUnderlayAnnotations = value

Gets or sets whether annotations under the chart should clip to bounds or not. Default value is true

GridLinesPanel
public IGridLinesPanel GridLinesPanel { get; }
value = ultrachartSurface.GridLinesPanel

Gets the GridLinesPanel where gridlines are drawn

GridLinesPanelStyle
public Style GridLinesPanelStyle { get; set; }
value = ultrachartSurface.GridLinesPanelStyle
ultrachartSurface.GridLinesPanelStyle = value

Gets or sets the GridLinesPanel style.

IsPolarChart
public bool IsPolarChart { get; private set; }
value = ultrachartSurface.IsPolarChart
ultrachartSurface.IsPolarChart = value

Gets whether this UltrachartSurface is a polar chart or not

LeftAxesPanelTemplate
public ItemsPanelTemplate LeftAxesPanelTemplate { get; set; }
value = ultrachartSurface.LeftAxesPanelTemplate
ultrachartSurface.LeftAxesPanelTemplate = value

Gets or sets the template that defines the panel which controls the layout of left-aligned axes

RenderableSeries
public ObservableCollection<IRenderableSeries> RenderableSeries { get; set; }
value = ultrachartSurface.RenderableSeries
ultrachartSurface.RenderableSeries = value

Gets the collection of RenderableSeries that this UltrachartSurface draws.

RenderSurfaceStyle
public Style RenderSurfaceStyle { get; set; }
value = ultrachartSurface.RenderSurfaceStyle
ultrachartSurface.RenderSurfaceStyle = value

Gets or sets the RenderSurface style.

RightAxesPanelTemplate
public ItemsPanelTemplate RightAxesPanelTemplate { get; set; }
value = ultrachartSurface.RightAxesPanelTemplate
ultrachartSurface.RightAxesPanelTemplate = value

Gets or sets the template that defines the panel which controls the layout of right-aligned axes

SelectedRenderableSeries
public ObservableCollection<IRenderableSeries> SelectedRenderableSeries { get; private set; }
value = ultrachartSurface.SelectedRenderableSeries
ultrachartSurface.SelectedRenderableSeries = value

Gets the collection of RenderableSeries that are selected.

SeriesSource
public ObservableCollection<IChartSeriesViewModel> SeriesSource { get; set; }
value = ultrachartSurface.SeriesSource
ultrachartSurface.SeriesSource = value

The SeriesSource property allows data-binding to a collection of IChartSeriesViewModel instances, for pairing of DataSeries with IRenderableSeries

StackedColumnsWrapper
internal IStackedColumnsWrapper StackedColumnsWrapper { get; set; }
value = ultrachartSurface.StackedColumnsWrapper
ultrachartSurface.StackedColumnsWrapper = value

Gets StackedColumnsWrapper that allows user to customize drawing of StackedColumnRenderableSeries

StackedMountainsWrapper
internal IStackedMountainsWrapper StackedMountainsWrapper { get; set; }
value = ultrachartSurface.StackedMountainsWrapper
ultrachartSurface.StackedMountainsWrapper = value

Gets StackedMountainsWrapper that allows user to customize drawing of StackedMountainRenderableSeries

TopAxesPanelTemplate
public ItemsPanelTemplate TopAxesPanelTemplate { get; set; }
value = ultrachartSurface.TopAxesPanelTemplate
ultrachartSurface.TopAxesPanelTemplate = value

Gets or sets the template that defines the panel which controls the layout of top-aligned axes

VersionAndLicenseInfo
public static string VersionAndLicenseInfo { get; }
value = UltrachartSurface.VersionAndLicenseInfo

Returns version and license info as a formatted string

ViewportManager
public IViewportManager ViewportManager { get; set; }
value = ultrachartSurface.ViewportManager
ultrachartSurface.ViewportManager = value

Gets or sets the ViewportManager instance on the chart, which handles behavior of the viewport on render

XAxes
public AxisCollection XAxes { get; set; }
value = ultrachartSurface.XAxes
ultrachartSurface.XAxes = value

Gets the collection of X-Axis IAxis that this UltrachartSurface measures against

XAxis
public IAxis XAxis { get; set; }
value = ultrachartSurface.XAxis
ultrachartSurface.XAxis = value

Gets or sets the primary XAxis on the UltrachartSurface (default side=Bottom)

YAxes
public AxisCollection YAxes { get; set; }
value = ultrachartSurface.YAxes
ultrachartSurface.YAxes = value

Gets the collection of Y-Axis IAxis that this UltrachartSurface measures against

YAxis
public IAxis YAxis { get; set; }
value = ultrachartSurface.YAxis
ultrachartSurface.YAxis = value

Gets or sets the primary YAxis on the UltrachartSurface (default side=Right)

ZoomExtentsCommand
public ICommand ZoomExtentsCommand { get; set; }
value = ultrachartSurface.ZoomExtentsCommand
ultrachartSurface.ZoomExtentsCommand = value

Gets or sets the zoom extents command, which when invoked, causes the UltrachartSurface to zoom to extents

Methods

AnimateZoomExtents
public void AnimateZoomExtents(TimeSpan duration)
ultrachartSurface.AnimateZoomExtents(duration)

Zooms to extents with the specified animation duration

duration
The duration of animation when zooming to extents
AnimateZoomExtentsX
public void AnimateZoomExtentsX(TimeSpan duration)
ultrachartSurface.AnimateZoomExtentsX(duration)

Zooms the chart to the extents of the data in the X-Direction, using animation with the specified duration

duration
The duration of the animation
AnimateZoomExtentsY
public void AnimateZoomExtentsY(TimeSpan duration)
ultrachartSurface.AnimateZoomExtentsY(duration)

Zooms the chart to the extents of the data in the Y-Direction, accounting for the current data in view in the X-direction

duration
AttachDataSeries
public void AttachDataSeries(IDataSeries dataSeries)
ultrachartSurface.AttachDataSeries(dataSeries)

Attaches listeners for DataSeries.DataSeriesChanged

dataSeries
ClearSeries
public void ClearSeries()
ultrachartSurface.ClearSeries()

Removes all DataSeries from the Ultrachart

DecrementSuspend
public void DecrementSuspend()
ultrachartSurface.DecrementSuspend()

Called by IUpdateSuspender each time a target suspender is disposed. When the final target suspender has been disposed, ResumeUpdates is called

DetachDataSeries
public void DetachDataSeries(IDataSeries dataSeries)
ultrachartSurface.DetachDataSeries(dataSeries)

Detaches listeners for DataSeries.DataSeriesChanged

dataSeries
ExportToBitmapSource
public BitmapSource ExportToBitmapSource()
result = ultrachartSurface.ExportToBitmapSource()

Export snapshot of current UltrachartSurface to BitmapSource

ExportToFile
public void ExportToFile(string fileName, ExportType exportType)
ultrachartSurface.ExportToFile(fileName, exportType)

Saves snapshot of current UltrachartSurface to file

fileName
exportType
Defines format of file to export
GetBoundsRelativeTo
public Rect GetBoundsRelativeTo(IHitTestable relativeTo)
result = ultrachartSurface.GetBoundsRelativeTo(relativeTo)

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

relativeTo
The relative to.
GetSchema
public XmlSchema GetSchema()
result = ultrachartSurface.GetSchema()

Returns an XmlSchema that describes the XML representation of the object that is produced by the WriteXml method and consumed by the ReadXml method

GetWindowedYRange
public IRange GetWindowedYRange(IAxis yAxis, IRange xRange)
result = ultrachartSurface.GetWindowedYRange(yAxis, xRange)

Equivalent of calling YAxis.GetMaximumRange() however returns the max range only for that axis (by the data-series on it) "windowed" = "displayed in current viewport" uses GrowBy()

yAxis
xRange
IsPointWithinBounds
public bool IsPointWithinBounds(Point point)
result = ultrachartSurface.IsPointWithinBounds(point)

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

point
The point to test

Returns: true if the Point is within the bounds

MeasureOverride
protected override Size MeasureOverride(Size constraint)
result = ultrachartSurface.MeasureOverride(constraint)

Called to remeasure a control.

constraint
The maximum size that the method can return.

Returns: The size of the control, up to the maximum specified by .

OnApplyTemplate
public override void OnApplyTemplate()
ultrachartSurface.OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

OnArrangeUltrachart
public Size OnArrangeUltrachart()
result = ultrachartSurface.OnArrangeUltrachart()

Preparations for a render pass, called internally, returns the viewport size

Returns: The required Viewport Size

OnAxisAlignmentChanged
public void OnAxisAlignmentChanged(IAxis axis, AxisAlignment oldValue)
ultrachartSurface.OnAxisAlignmentChanged(axis, oldValue)

Called internally by Ultrachart when AxisAlignment changes. Allows the UltrachartSurface to reposition the axis, args.g. at the top, left, bottom, right

axis
oldValue
OnDataContextChanged
protected override void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
ultrachartSurface.OnDataContextChanged(e)

Called when the UltrachartSurfaceBase DataContext changes.

e
The DependencyPropertyChangedEventArgs instance containing the event data.
OnIsCenterAxisChanged
public void OnIsCenterAxisChanged(IAxis axis)
ultrachartSurface.OnIsCenterAxisChanged(axis)

Called internally by Ultrachart when IsCenterAxis changes. Allows the UltrachartSurface to place the axis in the center of chart

axis
OnUltrachartRendered
public override void OnUltrachartRendered()
ultrachartSurface.OnUltrachartRendered()

Raises the Rendered event, fired at the end of a render pass immediately before presentation to the screen

OnUltrachartSurfaceLoaded
protected override void OnUltrachartSurfaceLoaded()
ultrachartSurface.OnUltrachartSurfaceLoaded()

Called when the UltrachartSurfaceBase is loaded. Perform initialization operations here.

OnUltrachartSurfaceSizeChanged
protected override void OnUltrachartSurfaceSizeChanged()
ultrachartSurface.OnUltrachartSurfaceSizeChanged()

Called when the UltrachartSurfaceBase Size changes. Perform render surface resize or redraw operations here

OnUltrachartSurfaceUnloaded
protected override void OnUltrachartSurfaceUnloaded()
ultrachartSurface.OnUltrachartSurfaceUnloaded()

Called when the UltrachartSurfaceBase is Unloaded and removed from the visual tree. Perform cleanup operations here

Print
public void Print(string description)
ultrachartSurface.Print(description)

Outputs current UltrachartSurface to printer

description
Description of printing job
ReadXml
public virtual void ReadXml(XmlReader reader)
ultrachartSurface.ReadXml(reader)

Generates UltrachartSurface from its XML representation.

reader
RegisterServices
protected override void RegisterServices(IServiceContainer serviceContainer)
ultrachartSurface.RegisterServices(serviceContainer)

Called in the constructor of UltrachartSurfaceBase, gives derived classes the opportunity to register services per UltrachartSurfaceBase instance

Returns: The populated IServiceContainer. Must not return null. Return at least an empty ServiceContainer

ResumeUpdates
public void ResumeUpdates(IUpdateSuspender updateSuspender)
ultrachartSurface.ResumeUpdates(updateSuspender)

Resumes updates on the target, intended to be called by IUpdateSuspender

SuspendUpdates
public IUpdateSuspender SuspendUpdates()
result = ultrachartSurface.SuspendUpdates()

Suspends drawing updates on the target until the returned object is disposed, when a final draw call will be issued

Returns: The disposable Update Suspender

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

Translates the point relative to the other hittestable element

point
The point.
relativeTo
The relative to.
WriteXml
public virtual void WriteXml(XmlWriter writer)
ultrachartSurface.WriteXml(writer)

Converts UltrachartSurface into its XML representation.

writer
ZoomExtents
public virtual void ZoomExtents()
ultrachartSurface.ZoomExtents()

Zooms the chart to the extents of the data, plus any X or Y Grow By fraction set on the X and Y Axes

ZoomExtentsX
public void ZoomExtentsX()
ultrachartSurface.ZoomExtentsX()

Zooms the chart to the extents of the data in the X-Direction

ZoomExtentsY
public void ZoomExtentsY()
ultrachartSurface.ZoomExtentsY()

Zooms the chart to the extents of the data in the Y-Direction, accounting for the current data in view in the X-direction

Events

AnnotationsCollectionNewCollectionAssigned
public event EventHandler AnnotationsCollectionNewCollectionAssigned
ultrachartSurface.AnnotationsCollectionNewCollectionAssigned += handler

Event raised when Annotations DependencyProperty is changed

AxisAlignmentChanged
public event EventHandler<AxisAlignmentChangedEventArgs> AxisAlignmentChanged
ultrachartSurface.AxisAlignmentChanged += handler

Event raised when alignment of any axis changed

XAxesCollectionNewCollectionAssigned
public event EventHandler XAxesCollectionNewCollectionAssigned
ultrachartSurface.XAxesCollectionNewCollectionAssigned += handler

Event raised when XAxes DependnecyProperty is changed

YAxesCollectionNewCollectionAssigned
public event EventHandler YAxesCollectionNewCollectionAssigned
ultrachartSurface.YAxesCollectionNewCollectionAssigned += handler

Event raised when YAxes DependnecyProperty is changed

Fields

AnimateZoomExtentsCommandProperty
public static readonly DependencyProperty AnimateZoomExtentsCommandProperty
value = UltrachartSurface.AnimateZoomExtentsCommandProperty

Defines the ZoomExtentsCommand DependencyProperty

AnnotationsProperty
public static readonly DependencyProperty AnnotationsProperty
value = UltrachartSurface.AnnotationsProperty

Defines the Annotations DependencyProperty

AutoRangeOnStartupProperty
public static readonly DependencyProperty AutoRangeOnStartupProperty
value = UltrachartSurface.AutoRangeOnStartupProperty

Defines the AutoRangeOnStartup DependencyProperty

BottomAxesPanelTemplateProperty
public static readonly DependencyProperty BottomAxesPanelTemplateProperty
value = UltrachartSurface.BottomAxesPanelTemplateProperty

Defines the RightAxisPanelTemplate DependencyProperty

ChartModifierProperty
public static readonly DependencyProperty ChartModifierProperty
value = UltrachartSurface.ChartModifierProperty

Defines the ChartModifier DependencyProperty

ClipOverlayAnnotationsProperty
public static readonly DependencyProperty ClipOverlayAnnotationsProperty
value = UltrachartSurface.ClipOverlayAnnotationsProperty

Defines the ClipOverlayAnnotations DepedencyProperty

ClipUnderlayAnnotationsProperty
public static readonly DependencyProperty ClipUnderlayAnnotationsProperty
value = UltrachartSurface.ClipUnderlayAnnotationsProperty

Defines the ClipUnderlayAnnotations DependencyProperty

GridLinesPanelStyleProperty
public static readonly DependencyProperty GridLinesPanelStyleProperty
value = UltrachartSurface.GridLinesPanelStyleProperty

Defines the GridLinesPanelStyle DependencyProperty

IsPolarChartProperty
public static readonly DependencyProperty IsPolarChartProperty
value = UltrachartSurface.IsPolarChartProperty

Defines the IsPolarChart DependencyProperty

LeftAxesPanelTemplateProperty
public static readonly DependencyProperty LeftAxesPanelTemplateProperty
value = UltrachartSurface.LeftAxesPanelTemplateProperty

Defines the LeftAxisPanelTemplate DependencyProperty

RenderableSeriesProperty
public static readonly DependencyProperty RenderableSeriesProperty
value = UltrachartSurface.RenderableSeriesProperty

Defines the RenderableSeries DependencyProperty

RenderSurfaceStyleProperty
public static readonly DependencyProperty RenderSurfaceStyleProperty
value = UltrachartSurface.RenderSurfaceStyleProperty

Defines the RenderSurfaceStyle DependencyProperty

RightAxesPanelTemplateProperty
public static readonly DependencyProperty RightAxesPanelTemplateProperty
value = UltrachartSurface.RightAxesPanelTemplateProperty

Defines the RightAxisPanelTemplate DependencyProperty

SelectedRenderableSeriesProperty
public static readonly DependencyProperty SelectedRenderableSeriesProperty
value = UltrachartSurface.SelectedRenderableSeriesProperty

Defines the SelectedRenderableSeries DependencyProperty

SeriesSourceProperty
public static readonly DependencyProperty SeriesSourceProperty
value = UltrachartSurface.SeriesSourceProperty

Defines the SeriesSource DependencyProperty

TopAxesPanelTemplateProperty
public static readonly DependencyProperty TopAxesPanelTemplateProperty
value = UltrachartSurface.TopAxesPanelTemplateProperty

Defines the RightAxisPanelTemplate DependencyProperty

ViewportManagerProperty
public static readonly DependencyProperty ViewportManagerProperty
value = UltrachartSurface.ViewportManagerProperty

Defines the ViewportManager DependencyProperty

XAxesProperty
public static readonly DependencyProperty XAxesProperty
value = UltrachartSurface.XAxesProperty

Defines the YAxes DependencyProperty

XAxisProperty
public static readonly DependencyProperty XAxisProperty
value = UltrachartSurface.XAxisProperty

Defines the XAxis DependencyProperty

YAxesProperty
public static readonly DependencyProperty YAxesProperty
value = UltrachartSurface.YAxesProperty

Defines the YAxes DependencyProperty

YAxisProperty
public static readonly DependencyProperty YAxisProperty
value = UltrachartSurface.YAxisProperty

Defines the YAxis DependencyProperty

ZoomExtentsCommandProperty
public static readonly DependencyProperty ZoomExtentsCommandProperty
value = UltrachartSurface.ZoomExtentsCommandProperty

Defines the ZoomExtentsCommand DependencyProperty