UltrachartSurfaceBase

StockSharp.Xaml.Charting.Visuals

An abstract base class containing shared code between different implementations of UltrachartSurface

Inherits: Control

Implements: IUltrachartSurfaceBase, ISuspendable, IInvalidatableElement

Constructors

UltrachartSurfaceBase
protected UltrachartSurfaceBase()
ultrachartSurfaceBase = UltrachartSurfaceBase()

Initializes a new instance of the UltrachartSurfaceBase class.

Properties

ChartTitle
public string ChartTitle { get; set; }
value = ultrachartSurfaceBase.ChartTitle
ultrachartSurfaceBase.ChartTitle = value

Gets or sets an optional Chart Title, displayed above the chart surface

ClipModifierSurface
public bool ClipModifierSurface { get; set; }
value = ultrachartSurfaceBase.ClipModifierSurface
ultrachartSurfaceBase.ClipModifierSurface = value

Gets or sets a value whether to clip the ChartModifierSurface property to bounds. Fefault false

DebugWhyDoesntUltrachartRender
public bool DebugWhyDoesntUltrachartRender { get; set; }
value = ultrachartSurfaceBase.DebugWhyDoesntUltrachartRender
ultrachartSurfaceBase.DebugWhyDoesntUltrachartRender = value

Gets or sets a flag whether Ultrachart should output rendering exceptions and 'Why Ultrachart Doesn't Render' reasons to the Debug Console. Default is True.

IsDisposed
protected bool IsDisposed { get; }
value = ultrachartSurfaceBase.IsDisposed

True if the UltrachartSurfaceBase has been disposed. If so do not draw!

IsSuspended
public bool IsSuspended { get; }
value = ultrachartSurfaceBase.IsSuspended

Gets a value indicating whether updates for the target are currently suspended

IsUltrachartSurfaceLoaded
protected bool IsUltrachartSurfaceLoaded { get; }
value = ultrachartSurfaceBase.IsUltrachartSurfaceLoaded

True if the UltrachartSurfaceBase has been Loaded

MaxFrameRate
public double? MaxFrameRate { get; set; }
value = ultrachartSurfaceBase.MaxFrameRate
ultrachartSurfaceBase.MaxFrameRate = value

Gets or sets the Maximum Framerate of this UltrachartSurface in Hertz (Frames per Second). Default is 100.0

ModifierSurface
public IChartModifierSurface ModifierSurface { get; }
value = ultrachartSurfaceBase.ModifierSurface

Gets the ModifierSurface, which is used to draw primitives for the Chart Modifiers

RenderPriority
public RenderPriority RenderPriority { get; set; }
value = ultrachartSurfaceBase.RenderPriority
ultrachartSurfaceBase.RenderPriority = value

Gets or sets the RenderPriority. The default is Normal

RenderSurface
public IRenderSurface RenderSurface { get; set; }
value = ultrachartSurfaceBase.RenderSurface
ultrachartSurfaceBase.RenderSurface = value

Gets or sets the RenderSurface implementation that this UltrachartSurfaceBase uses. Default implementation for a UltrachartSurface is a HighSpeedRenderSurface, however Ultrachart supports additional render surfaces, providing high quality software and high speed hardware accelerated or 3D renderers.

RootGrid
public IMainGrid RootGrid { get; }
value = ultrachartSurfaceBase.RootGrid

Gets the Root Grid that hosts the Ultrachart RenderSurface, GridLinesPanel, X-Axis and Y-Axes (Left and right)

Services
public IServiceContainer Services { get; protected internal set; }
value = ultrachartSurfaceBase.Services
ultrachartSurfaceBase.Services = value

Gets the ServiceContainer which provides access to services throughout Ultrachart. ServiceContainers are created one per UltrachartSurface instance, and shared between peripheral components such as AxisBase, BaseRenderableSeries, ChartModifierBase instances. For a full list of available services, see the remarks on ServiceContainer

SyncRoot
public object SyncRoot { get; }
value = ultrachartSurfaceBase.SyncRoot

A synchronization object which is locked during a render pass. If you lock this Ultrachart will not render and will be blocked on the UI thread until the lock is released. This is used internally by DataSeries to lock the UltrachartSurface when bulk updates are done.

Methods

DecrementSuspend
public void DecrementSuspend()
ultrachartSurfaceBase.DecrementSuspend()

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

Dispose
public void Dispose()
ultrachartSurfaceBase.Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

DoDrawingLoop
protected abstract void DoDrawingLoop()
ultrachartSurfaceBase.DoDrawingLoop()

The inner drawing loop. Called once per frame. Do your drawing here.

Finalize
protected override void Finalize()
ultrachartSurfaceBase.Finalize()

Finalizes an instance of the UltrachartSurface class.

GetAndAssertTemplateChild``1
protected T GetAndAssertTemplateChild<T>(string childName)
result = ultrachartSurfaceBase.GetAndAssertTemplateChild(childName)

Gets the TemplateChild by the specified name and casts to type , asserting that the result is not null

childName
Name of the templated part.

Returns: The template part instance

InvalidateElement
public virtual void InvalidateElement()
ultrachartSurfaceBase.InvalidateElement()

Asynchronously requests that the element redraws itself plus children. Will be ignored if the element is ISuspendable and currently IsSuspended (within a SuspendUpdates/ResumeUpdates call)

OnApplyTemplate
public override void OnApplyTemplate()
ultrachartSurfaceBase.OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.

OnDataContextChanged
protected virtual void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
ultrachartSurfaceBase.OnDataContextChanged(e)

Called when the UltrachartSurfaceBase DataContext changes.

e
The DependencyPropertyChangedEventArgs instance containing the event data.
OnInvalidateUltrachartSurface
protected static void OnInvalidateUltrachartSurface(DependencyObject d, DependencyPropertyChangedEventArgs e)
UltrachartSurfaceBase.OnInvalidateUltrachartSurface(d, e)

Calls InvalidateElement on the UltrachartSurfaceBase, should be used as the callback for Dependency Properties in UltrachartSurface that should trigger a redraw

d
The d.
e
The DependencyPropertyChangedEventArgs instance containing the event data.
OnLoad
public virtual void OnLoad()
ultrachartSurfaceBase.OnLoad()

Forces initialization of the UltrachartSurface in the case it is being used to render off-screen (on server)

OnRenderSurfaceDependencyPropertyChanged
protected virtual void OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
ultrachartSurfaceBase.OnRenderSurfaceDependencyPropertyChanged(e)

Called with the RenderSurfaceProperty changes.

e
The DependencyPropertyChangedEventArgs instance containing the event data.
OnUltrachartRendered
public virtual void OnUltrachartRendered()
ultrachartSurfaceBase.OnUltrachartRendered()

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

OnUltrachartSurfaceLoaded
protected virtual void OnUltrachartSurfaceLoaded()
ultrachartSurfaceBase.OnUltrachartSurfaceLoaded()

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

OnUltrachartSurfaceSizeChanged
protected virtual void OnUltrachartSurfaceSizeChanged()
ultrachartSurfaceBase.OnUltrachartSurfaceSizeChanged()

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

OnUltrachartSurfaceUnloaded
protected virtual void OnUltrachartSurfaceUnloaded()
ultrachartSurfaceBase.OnUltrachartSurfaceUnloaded()

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

RegisterServices
protected virtual void RegisterServices(IServiceContainer serviceContainer)
ultrachartSurfaceBase.RegisterServices(serviceContainer)

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

serviceContainer
The service container instance.
ResumeUpdates
public void ResumeUpdates(IUpdateSuspender suspender)
ultrachartSurfaceBase.ResumeUpdates(suspender)

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

suspender
SetMouseCursor
public void SetMouseCursor(Cursor cursor)
ultrachartSurfaceBase.SetMouseCursor(cursor)

Sets a Cursor on the UltrachartSurface

cursor
The new Cursor
SuspendUpdates
public IUpdateSuspender SuspendUpdates()
result = ultrachartSurfaceBase.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

Events

Rendered
public event EventHandler<EventArgs> Rendered
ultrachartSurfaceBase.Rendered += handler

Event raised at the end of a single render pass

Fields

ChartTitleProperty
public static readonly DependencyProperty ChartTitleProperty
value = UltrachartSurfaceBase.ChartTitleProperty

Defines the ChartTitle DependencyProperty

ClipModifierSurfaceProperty
public static readonly DependencyProperty ClipModifierSurfaceProperty
value = UltrachartSurfaceBase.ClipModifierSurfaceProperty

Defines the ClipModifierSurface DependencyProperty

MaxFrameRateProperty
public static readonly DependencyProperty MaxFrameRateProperty
value = UltrachartSurfaceBase.MaxFrameRateProperty

Defines the MaxFrameRate DependencyProperty

RenderSurfaceProperty
public static readonly DependencyProperty RenderSurfaceProperty
value = UltrachartSurfaceBase.RenderSurfaceProperty

Defines the RenderSurface DependencyProperty