RenderSurfaceBase

StockSharp.Xaml.Charting.Rendering.Common

An abstract base class for the RenderSurface, which is a viewport used within the to render BaseRenderableSeries types in a fast manner. The renderer architecture is plugin based, meaning we have build multiple implementations of RenderSurfaceBase.

Наследует: ContentControl

Реализует: IRenderSurface2D, IRenderSurface, IDisposable, IHitTestable, IInvalidatableElement

Конструкторы

RenderSurfaceBase()

Initializes a new instance of the RenderSurfaceBase class.

Свойства

ChildSeries : ReadOnlyCollection<IRenderableSeries>

Gets the child RenderableSeries in this IRenderSurface2D instance

Grid : Grid

Gets the root element Grid which hosts components in the RenderSurfaceBase

IsSizeValidForDrawing : bool

Returns true if the RenderSurfaceBase size is valid for drawing

MaxFrameRate : double?

Gets or sets the Maximum Framerate of this RenderSurface. By default this is bound to the parent UltrachartSurface.MaxFrameRate

NeedsResizing : bool

Returns True if the RenderSurfaceBase size has changed and the viewport needs resizing

ResizeThrottleMs : int

Gets or sets a timeout for resizing, e.g. 100ms means that the RenderSurface will batch up all Resize events received within a 100ms window. This reduces the CPU usage on resize. Also see UseResizeThrottle dependency property, which must be true

Services : IServiceContainer

Gets or sets the IServiceContainer instance

UseResizeThrottle : bool

If true, uses the ResizeThrottleMs value to batch up Resize Events received within a certain time window, reducing the CPU load on resize

Методы

AddSeries(IRenderableSeries)

Adds the IRenderableSeries instance to the RenderSurfaceBase

renderableSeries
The renderable series.
AddSeries(IEnumerable<IRenderableSeries>)

Adds the IRenderableSeries instance to the IRenderSurface2D

renderableSeries
Clear()

Clears the viewport

ClearSeries()

Clears all IRenderableSeries on the RenderSurfaceBase

ContainsSeries(IRenderableSeries) : bool

Returns True if the RenderSurfaceBase contains the IRenderableSeries instance

renderableSeries
the IRenderableSeries instance

Возвращает: true if the specified renderable series contains series; otherwise, false.

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources.
Dispose()

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

DisposeUnmanagedResources()

Derived classes may override this method to be notified when to dispose of unmanaged resources. Called when the RenderSurfaceBase is disposed

Finalize()

Finalizes an instance of the RenderSurfaceBase class.

GetBoundsRelativeTo(IHitTestable) : Rect

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

relativeTo
GetRenderContext() : IRenderContext2D

When overridden in a derived class, returns a RenderContext valid for the current render pass

GetRenderSurfaceType(UIElement) : string

Gets the RenderSurfaceType attached property

element
The element.
InvalidateElement()

Invalidates the RenderSurface, causing a repaint to occur

IsPointWithinBounds(Point) : bool

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

point
The point to test

Возвращает: true if the Point is within the bounds

OnDraw()

Raises the DrawDraw event which preceeds the render operation

OnRendered(double)

Raises the Rendered event with the specified duration

duration
The duration.
OnRenderSurfaceBaseLoaded(object, RoutedEventArgs)

Called when the RenderSurfaceBase is loaded into the visual tree

sender
The sender.
e
The RoutedEventArgs instance containing the event data.
OnRenderSurfaceBaseUnloaded(object, RoutedEventArgs)

Called when the RenderSurfaceBase is Unloaded from the visual tree

sender
The sender.
e
The RoutedEventArgs instance containing the event data.
OnRenderTimeElapsed()

Called when the Rendering event is raised

PublishResizedMessage(int, int)

Publishes RenderSurfaceResizedMessage with actual viewport size

width
height
RecreateSurface()

Recreates the elements required by the Viewport, called once at startup and when the surface is resized

RemoveSeries(IRenderableSeries)

Removes the IRenderableSeries from the RenderSurfaceBase

renderableSeries
The renderable series.
SetRenderSurfaceType(UIElement, string)

Sets the RenderSurfaceType attached property

element
The element.
value
The value.
TranslatePoint(Point, IHitTestable) : Point

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

Возвращает: The transformed Point

События

Draw : EventHandler<DrawEventArgs>

Raised each time the render surface is to be drawn. Handle this event to paint to the surface

Rendered : EventHandler<RenderedEventArgs>

Raised immediately after a render operation has completed

Поля

MaxFrameRateProperty : DependencyProperty

Defines the MaxFrameRate DependencyProperty

RenderSurfaceTypeProperty : DependencyProperty

Defines the RenderSurfaceType attached property

ResizeThrottleMsProperty : DependencyProperty

Defines the ResizeThrottleMs DependencyProperty

UseResizeThrottleProperty : DependencyProperty

Defines the UseResizeThrottle DependencyProperty