ChartModifierBase
Defines the base class to a Chart Modifier, which can be used to extend the interactivity or rendering of the UltrachartSurface
Inherits: ApiElementBase
Implements: IChartModifier, IChartModifierBase, IReceiveMouseEvents, INotifyPropertyChanged, IXmlSerializable
Constructors
protected ChartModifierBase()
chartModifierBase = ChartModifierBase()
Initializes a new instance of the ChartModifierBase class.
Properties
public ExecuteOn ExecuteOn { get; set; }
value = chartModifierBase.ExecuteOn
chartModifierBase.ExecuteOn = value
Determines when the ZoomExtentsModifier executes, args.g. MouseDoubleClick will cause a zoom extents on mouse double click of the parent UltrachartSurface
public bool IsEnabled { get; set; }
value = chartModifierBase.IsEnabled
chartModifierBase.IsEnabled = value
Gets or sets a value indicating whether this element is enabled in the user interface (UI).
Returns: true if the element is enabled; otherwise, false. The default value is true.
public bool IsMouseLeftButtonDown { get; }
value = chartModifierBase.IsMouseLeftButtonDown
Gets if the Left mouse button is currently down
public bool IsMouseMiddleButtonDown { get; }
value = chartModifierBase.IsMouseMiddleButtonDown
Gets if the Middle mouse button is currently down
public bool IsMouseRightButtonDown { get; }
value = chartModifierBase.IsMouseRightButtonDown
Gets of the right mouse button is currently down
public string ModifierName { get; protected set; }
value = chartModifierBase.ModifierName
chartModifierBase.ModifierName = value
Gets modifier name
public string MouseEventGroup { get; set; }
value = chartModifierBase.MouseEventGroup
chartModifierBase.MouseEventGroup = value
Gets or sets a Mouse Event Group, an ID used to share mouse events across multiple targets
public override IUltrachartSurface ParentSurface { get; set; }
value = chartModifierBase.ParentSurface
chartModifierBase.ParentSurface = value
Gets or sets the parent UltrachartSurface to perform operations on
public bool ReceiveHandledEvents { get; set; }
value = chartModifierBase.ReceiveHandledEvents
chartModifierBase.ReceiveHandledEvents = value
Gets or sets a value, indicates whether current modifier handles events which have already been marked as handled
public override IServiceContainer Services { get; set; }
value = chartModifierBase.Services
chartModifierBase.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
public virtual bool CanReceiveMouseEvents()
result = chartModifierBase.CanReceiveMouseEvents()
Returns a value indicating whether mouse events should be propagated to the mouse target.
public Point GetPointRelativeTo(Point point, IHitTestable relativeTo)
result = chartModifierBase.GetPointRelativeTo(point, relativeTo)
Transforms the input point relative to the IHitTestable element. Can be used to transform points relative to the ModifierSurface, or XAxis for instance.
- point
- The input point
- relativeTo
- The IHitTestable element to translate points relative to
Returns: The output point
public Point GetRelativePosition(Point point, IHitTestable relativeTo)
result = chartModifierBase.GetRelativePosition(point, relativeTo)
OBSOLETE
- point
- relativeTo
public XmlSchema GetSchema()
result = chartModifierBase.GetSchema()
Returns an XmlSchema that describes the XML representation of the object that is produced by the WriteXml method and consumed by the ReadXml method
public bool IsPointWithinBounds(Point mousePoint, IHitTestable hitTestable)
result = chartModifierBase.IsPointWithinBounds(mousePoint, hitTestable)
Gets whether the mouse point is within the bounds of the hit-testable element. Assumes the mouse-point has not been translated yet (performs translation)
- mousePoint
- hitTestable
protected bool MatchesExecuteOn(MouseButtons mouseButtons, ExecuteOn executeOn)
result = chartModifierBase.MatchesExecuteOn(mouseButtons, executeOn)
Determines whether the currently pressed mouse buttons matches the ExecuteOn. Used to filter events such as zoom or pan on right mouse button
- mouseButtons
- executeOn
protected virtual void OnAnnotationCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
chartModifierBase.OnAnnotationCollectionChanged(sender, args)
Called when the AnnotationCollection changes. Overridden in derived classes.
public override void OnAttached()
chartModifierBase.OnAttached()
Called when the element is attached to the Chart Surface
protected virtual void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
chartModifierBase.OnDataContextChanged(sender, e)
Called when the DataContext of the ChartModifierBase changes
- sender
- e
public override void OnDetached()
chartModifierBase.OnDetached()
Called immediately before the element is detached from the Chart Surface
protected virtual void OnIsEnabledChanged()
chartModifierBase.OnIsEnabledChanged()
Called when the IsEnabled property changes on this ChartModifierBase instance
public virtual void OnMasterMouseLeave(ModifierMouseArgs e)
chartModifierBase.OnMasterMouseLeave(e)
Called when the mouse leaves the Master of current MouseEventGroup
- e
public virtual void OnModifierDoubleClick(ModifierMouseArgs e)
chartModifierBase.OnModifierDoubleClick(e)
Called when a Mouse DoubleClick occurs on the parent UltrachartSurface
- e
- Arguments detailing the mouse button operation
public virtual void OnModifierMouseDown(ModifierMouseArgs e)
chartModifierBase.OnModifierMouseDown(e)
Called when a Mouse Button is pressed on the parent UltrachartSurface
- e
- Arguments detailing the mouse button operation
public virtual void OnModifierMouseMove(ModifierMouseArgs e)
chartModifierBase.OnModifierMouseMove(e)
Called when the Mouse is moved on the parent UltrachartSurface
- e
- Arguments detailing the mouse move operation
public virtual void OnModifierMouseUp(ModifierMouseArgs e)
chartModifierBase.OnModifierMouseUp(e)
Called when a Mouse Button is released on the parent UltrachartSurface
- e
- Arguments detailing the mouse button operation
public virtual void OnModifierMouseWheel(ModifierMouseArgs e)
chartModifierBase.OnModifierMouseWheel(e)
Called when the Mouse Wheel is scrolled on the parent UltrachartSurface
- e
- Arguments detailing the mouse wheel operation
public virtual void OnModifierTouchDown(ModifierTouchManipulationArgs e)
chartModifierBase.OnModifierTouchDown(e)
Called when a Multi-Touch Down interaction occurs on the parent UltrachartSurface
- e
- Arguments detailing the manipulation operation
public virtual void OnModifierTouchMove(ModifierTouchManipulationArgs e)
chartModifierBase.OnModifierTouchMove(e)
Called when a Multi-Touch Move interaction occurs on the parent UltrachartSurface
- e
- Arguments detailing the manipulation operation
public virtual void OnModifierTouchUp(ModifierTouchManipulationArgs e)
chartModifierBase.OnModifierTouchUp(e)
Called when a Multi-Touch Up interaction occurs on the parent UltrachartSurface
- e
- Arguments detailing the manipulation operation
protected virtual void OnParentSurfaceMouseEnter()
chartModifierBase.OnParentSurfaceMouseEnter()
Called when the mouse enters the parent UltrachartSurface
protected virtual void OnParentSurfaceMouseLeave()
chartModifierBase.OnParentSurfaceMouseLeave()
Called when the mouse leaves the parent UltrachartSurface
public virtual void OnParentSurfaceRendered(UltrachartRenderedMessage e)
chartModifierBase.OnParentSurfaceRendered(e)
Called when the parent UltrachartSurface is rendered
- e
- The UltrachartRenderedMessage which contains the event arg data
public virtual void OnParentSurfaceResized(UltrachartResizedMessage e)
chartModifierBase.OnParentSurfaceResized(e)
Called when the parent UltrachartSurface is resized
- e
- The UltrachartResizedMessage which contains the event arg data
protected virtual void OnSelectedSeriesChanged(IEnumerable<IRenderableSeries> oldSeries, IEnumerable<IRenderableSeries> newSeries)
chartModifierBase.OnSelectedSeriesChanged(oldSeries, newSeries)
Called when the parent surface SelectedSeries collection changes
protected virtual void OnXAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
chartModifierBase.OnXAxesCollectionChanged(sender, args)
Called with the XAxesAxisCollection changes. Overridden in derived classes.
protected virtual void OnYAxesCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
chartModifierBase.OnYAxesCollectionChanged(sender, args)
Called with the YAxesAxisCollection changes. Overridden in derived classes.
public virtual void ReadXml(XmlReader reader)
chartModifierBase.ReadXml(reader)
Generates ChartModifierBase from its XML representation.
- reader
public virtual void ResetInertia()
chartModifierBase.ResetInertia()
Instantly stops any inertia that can be associated with this modifier.
protected void SetCursor(Cursor cursor)
chartModifierBase.SetCursor(cursor)
Sets the Cursor on the parent UltrachartSurface
- cursor
StockSharp#Xaml#Charting#ChartModifiers#IChartModifier#OnAnnotationCollectionChanged(object, NotifyCollectionChangedEventArgs)
Called when the AnnotationCollection changes
StockSharp#Xaml#Charting#ChartModifiers#IChartModifier#OnXAxesCollectionChanged(object, NotifyCollectionChangedEventArgs)
Called with the XAxesAxisCollection changes
StockSharp#Xaml#Charting#ChartModifiers#IChartModifier#OnYAxesCollectionChanged(object, NotifyCollectionChangedEventArgs)
Called with the YAxesAxisCollection changes
public virtual void WriteXml(XmlWriter writer)
chartModifierBase.WriteXml(writer)
Converts ChartModifierBase into its XML representation.
- writer
Fields
public static readonly DependencyProperty ExecuteOnProperty
value = ChartModifierBase.ExecuteOnProperty
Defines the ExecuteOn DependencyProperty
public static readonly DependencyProperty IsEnabledProperty
value = ChartModifierBase.IsEnabledProperty
Defines the IsEnabled Attached Property
public static readonly DependencyProperty MouseModifierProperty
value = ChartModifierBase.MouseModifierProperty
Defines the MouseModifier DependencyProperty
public static readonly DependencyProperty ReceiveHandledEventsProperty
value = ChartModifierBase.ReceiveHandledEventsProperty
Defines the ReceiveHandledEvents DependencyProperty