UltrachartSurfaceBase
An abstract base class containing shared code between different implementations of UltrachartSurface
Inherits: Control
Implements: IUltrachartSurfaceBase, ISuspendable, IInvalidatableElement
Constructors
protected UltrachartSurfaceBase()
ultrachartSurfaceBase = UltrachartSurfaceBase()
Initializes a new instance of the UltrachartSurfaceBase class.
Properties
public string ChartTitle { get; set; }
value = ultrachartSurfaceBase.ChartTitle
ultrachartSurfaceBase.ChartTitle = value
Gets or sets an optional Chart Title, displayed above the chart surface
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
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.
protected bool IsDisposed { get; }
value = ultrachartSurfaceBase.IsDisposed
True if the UltrachartSurfaceBase has been disposed. If so do not draw!
public bool IsSuspended { get; }
value = ultrachartSurfaceBase.IsSuspended
Gets a value indicating whether updates for the target are currently suspended
protected bool IsUltrachartSurfaceLoaded { get; }
value = ultrachartSurfaceBase.IsUltrachartSurfaceLoaded
True if the UltrachartSurfaceBase has been Loaded
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
public IChartModifierSurface ModifierSurface { get; }
value = ultrachartSurfaceBase.ModifierSurface
Gets the ModifierSurface, which is used to draw primitives for the Chart Modifiers
public RenderPriority RenderPriority { get; set; }
value = ultrachartSurfaceBase.RenderPriority
ultrachartSurfaceBase.RenderPriority = value
Gets or sets the RenderPriority. The default is Normal
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.
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)
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
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
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
public void Dispose()
ultrachartSurfaceBase.Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
protected abstract void DoDrawingLoop()
ultrachartSurfaceBase.DoDrawingLoop()
The inner drawing loop. Called once per frame. Do your drawing here.
protected override void Finalize()
ultrachartSurfaceBase.Finalize()
Finalizes an instance of the UltrachartSurface class.
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
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)
public override void OnApplyTemplate()
ultrachartSurfaceBase.OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate.
protected virtual void OnDataContextChanged(DependencyPropertyChangedEventArgs e)
ultrachartSurfaceBase.OnDataContextChanged(e)
Called when the UltrachartSurfaceBase DataContext changes.
- e
- The DependencyPropertyChangedEventArgs instance containing the event data.
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.
public virtual void OnLoad()
ultrachartSurfaceBase.OnLoad()
Forces initialization of the UltrachartSurface in the case it is being used to render off-screen (on server)
protected virtual void OnRenderSurfaceDependencyPropertyChanged(DependencyPropertyChangedEventArgs e)
ultrachartSurfaceBase.OnRenderSurfaceDependencyPropertyChanged(e)
Called with the RenderSurfaceProperty changes.
- e
- The DependencyPropertyChangedEventArgs instance containing the event data.
public virtual void OnUltrachartRendered()
ultrachartSurfaceBase.OnUltrachartRendered()
Raises the Rendered event, fired at the end of a render pass immediately before presentation to the screen
protected virtual void OnUltrachartSurfaceLoaded()
ultrachartSurfaceBase.OnUltrachartSurfaceLoaded()
Called when the UltrachartSurfaceBase is loaded. Perform initialization operations here.
protected virtual void OnUltrachartSurfaceSizeChanged()
ultrachartSurfaceBase.OnUltrachartSurfaceSizeChanged()
Called when the UltrachartSurfaceBase Size changes. Perform render surface resize or redraw operations here
protected virtual void OnUltrachartSurfaceUnloaded()
ultrachartSurfaceBase.OnUltrachartSurfaceUnloaded()
Called when the UltrachartSurfaceBase is Unloaded and removed from the visual tree. Perform cleanup operations here
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.
public void ResumeUpdates(IUpdateSuspender suspender)
ultrachartSurfaceBase.ResumeUpdates(suspender)
Resumes updates on the target, intended to be called by IUpdateSuspender
- suspender
public void SetMouseCursor(Cursor cursor)
ultrachartSurfaceBase.SetMouseCursor(cursor)
Sets a Cursor on the UltrachartSurface
- cursor
- The new Cursor
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
public event EventHandler<EventArgs> Rendered
ultrachartSurfaceBase.Rendered += handler
Event raised at the end of a single render pass
Fields
public static readonly DependencyProperty ChartTitleProperty
value = UltrachartSurfaceBase.ChartTitleProperty
Defines the ChartTitle DependencyProperty
public static readonly DependencyProperty ClipModifierSurfaceProperty
value = UltrachartSurfaceBase.ClipModifierSurfaceProperty
Defines the ClipModifierSurface DependencyProperty
public static readonly DependencyProperty MaxFrameRateProperty
value = UltrachartSurfaceBase.MaxFrameRateProperty
Defines the MaxFrameRate DependencyProperty
public static readonly DependencyProperty RenderSurfaceProperty
value = UltrachartSurfaceBase.RenderSurfaceProperty
Defines the RenderSurface DependencyProperty