IViewportManager

StockSharp.Xaml.Charting

Defines the interface to a ViewportManager, which may be used to intercept the X,Y axis ranging during render and invalidate the parent surface

Implements: IUltrachartController, ISuspendable, IInvalidatableElement

Properties

IsAttached
public bool IsAttached { get; }
value = iViewportManager.IsAttached

Returns True when a ViewportManagerBase has the UltrachartSurface attached to.

Services
public IServiceContainer Services { get; set; }
value = iViewportManager.Services
iViewportManager.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

Methods

AttachUltrachartSurface
public void AttachUltrachartSurface(IUltrachartSurface scs)
iViewportManager.AttachUltrachartSurface(scs)

Called when the UltrachartSurface is attached to a ViewportManagerBase. May be overridden to get notification of attachment.

scs
The UltrachartSurface instance
CalculateAutoRange
public IRange CalculateAutoRange(IAxis axis)
result = iViewportManager.CalculateAutoRange(axis)

Called by the UltrachartSurface during render to perform autoranging. Override in derived types to return a custom value

axis
The axis to calculate for

Returns: The new IRange VisibleRange for the axis

CalculateNewXAxisRange
public IRange CalculateNewXAxisRange(IAxis xAxis)
result = iViewportManager.CalculateNewXAxisRange(xAxis)

Called by the UltrachartSurface during render to calculate the new XAxis VisibleRange. Override in derived types to return a custom value

xAxis
The XAxis to calculate for

Returns: The new IRange VisibleRange for the axis

CalculateNewYAxisRange
public IRange CalculateNewYAxisRange(IAxis yAxis, RenderPassInfo renderPassInfo)
result = iViewportManager.CalculateNewYAxisRange(yAxis, renderPassInfo)

Called by the UltrachartSurface during render to calculate the new YAxis VisibleRange. Override in derived types to return a custom value

yAxis
The YAxis to calculate for
renderPassInfo
The current RenderPassInfo containing render data

Returns: The new IRange VisibleRange for the axis

DetachUltrachartSurface
public void DetachUltrachartSurface()
iViewportManager.DetachUltrachartSurface()

Called when the UltrachartSurface is detached from a ViewportManagerBase. May be overridden to get notification of detachment.

InvalidateParentSurface
public void InvalidateParentSurface(RangeMode rangeMode)
iViewportManager.InvalidateParentSurface(rangeMode)

May be called to trigger a redraw on the parent UltrachartSurface. See tne RangeMode for available options.

rangeMode
Tne RangeMode with options for the re-draw
OnParentSurfaceRendered
public void OnParentSurfaceRendered(IUltrachartSurface ultraChartSurface)
iViewportManager.OnParentSurfaceRendered(ultraChartSurface)

Called when the IUltrachartSurface is rendered.

ultraChartSurface
The UltrachartSurface instance
OnVisibleRangeChanged
public void OnVisibleRangeChanged(IAxis axis)
iViewportManager.OnVisibleRangeChanged(axis)

Called when the VisibleRange changes for an axis. Override in derived types to get a notification of this occurring

axis
The IAxisinstance