ViewportManagerBase
Defines a base class for a ViewportManager, which may be used to control visible range and ranging on a UltrachartSurface
実装: IViewportManager, IUltrachartController, ISuspendable, IInvalidatableElement
プロパティ
IsAttached : bool
Gets the value indicating whether a ViewportManagerBase has the UltrachartSurface attached to.
IsSuspended : bool
Gets a value indicating whether updates for the target are currently suspended
Services : IServiceContainer
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
メソッド
AnimateZoomExtents(TimeSpan)
Zooms to extents with the specified animation duration
- duration
- The duration of animation when zooming to extents
AnimateZoomExtentsX(TimeSpan)
Zooms the chart to the extents of the data in the X-Direction
- duration
AnimateZoomExtentsY(TimeSpan)
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
AttachUltrachartSurface(IUltrachartSurface)
Called when the ViewportManagerBase is attached to a parent UltrachartSurface
- scs
- The UltrachartSurface instance
CalculateAutoRange(IAxis) : IRange
Overridden by derived types, called when the parent UltrachartSurface requests to perform autoranging. The Range returned by this method will be applied to the chart on render
- axis
- The axis
戻り値: The new VisibleRange for the YAxis
CalculateNewXAxisRange(IAxis) : IRange
Called by the UltrachartSurface during render to calculate the new XAxis VisibleRange. Override in derived types to return a custom value
- xAxis
戻り値: The new IRange VisibleRange for the axis
CalculateNewYAxisRange(IAxis, RenderPassInfo) : IRange
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
戻り値: The new IRange VisibleRange for the axis
DecrementSuspend()
Called by IUpdateSuspender each time a target suspender is disposed. When the final target suspender has been disposed, ResumeUpdates is called
DetachUltrachartSurface()
Called when the ViewportManagerBase is detached from a parent UltrachartSurface
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)
InvalidateParentSurface(RangeMode)
Triggers a redraw on the parent surface with the specified RangeMode
- rangeMode
- The RangeMode specifying how to redraw the parent surface
OnCalculateNewXRange(IAxis) : IRange
Overridden by derived types, called when the parent UltrachartSurface requests the XAxis VisibleRange. The Range returned by this method will be applied to the chart on render
- xAxis
- The XAxis
戻り値: The new VisibleRange for the XAxis
OnCalculateNewYRange(IAxis, RenderPassInfo) : IRange
Overridden by derived types, called when the parent UltrachartSurface requests a YAxis VisibleRange. The Range returned by this method will be applied to the chart on render
- yAxis
- The YAxis
- renderPassInfo
- The render pass info.
戻り値: The new VisibleRange for the YAxis
OnInvalidateParentSurface(DependencyPropertyChangedEventArgs)
Raises the InvalidateParentSurface event.
- e
- The DependencyPropertyChangedEventArgs instance containing the event data.
OnParentSurfaceRendered(IUltrachartSurface)
Called when the IUltrachartSurface is rendered.
- ultraChartSurface
- The UltrachartSurface instance
OnVisibleRangeChanged(IAxis)
Called when the VisibleRange changes for an axis. Override in derived types to get a notification of this occurring
- axis
- The IAxisinstance
ResumeUpdates(IUpdateSuspender)
Resumes updates on the target, intended to be called by IUpdateSuspender
- suspender
SuspendUpdates() : IUpdateSuspender
Suspends drawing updates on the target until the returned object is disposed, when a final draw call will be issued
戻り値: The disposable Update Suspender
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()
Zooms the chart to the extents of the data in the X-Direction
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