WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartCrossHairBehavior - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartCrossHairBehavior

    ChartCrossHairBehavior enables viewing of informations related to Chart coordinates, at mouse over position or at touch contact point inside a Chart.

    Inheritance
    System.Object
    ChartBehavior
    ChartCrossHairBehavior
    Implements
    ICloneable
    Inherited Members
    ChartBehavior.chartAxis
    ChartBehavior.Clone()
    ChartBehavior.DetachElement(UIElement)
    ChartBehavior.OnDragEnter(DragEventArgs)
    ChartBehavior.OnDragLeave(DragEventArgs)
    ChartBehavior.OnDragOver(DragEventArgs)
    ChartBehavior.OnDrop(DragEventArgs)
    ChartBehavior.OnGotFocus(RoutedEventArgs)
    ChartBehavior.OnLostFocus(RoutedEventArgs)
    ChartBehavior.OnMouseWheel(MouseWheelEventArgs)
    ChartBehavior.OnMouseEnter(MouseEventArgs)
    ChartBehavior.OnKeyUp(KeyEventArgs)
    ChartBehavior.OnKeyDown(KeyEventArgs)
    ChartBehavior.OnManipulationStarted(ManipulationStartedEventArgs)
    ChartBehavior.OnManipulationCompleted(ManipulationCompletedEventArgs)
    ChartBehavior.OnManipulationDelta(ManipulationDeltaEventArgs)
    ChartBehavior.OnDoubleTapped(MouseButtonEventArgs)
    ChartBehavior.GetYValuesBasedOnIndex(Double, ChartSeriesBase)
    ChartBehavior.UpdateArea()
    ChartBehavior.AdorningCanvas
    ChartBehavior.BottomAdorningCanvas
    ChartBehavior.ChartArea
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.SfChart.WPF.dll
    Syntax
    public class ChartCrossHairBehavior : ChartBehavior, ICloneable
    Remarks

    ChartCrossHairBehavior displays a vertical line, horizontal line and a popup like control displaying information about the data point at touch contact point or at mouse over position. You can also customize the look of cross hair and information displayed in a label.

    Constructors

    ChartCrossHairBehavior()

    Called when instance created for ChartCrossHairBehavior

    Declaration
    public ChartCrossHairBehavior()

    Fields

    CurrentPoint

    Declaration
    protected Point CurrentPoint
    Field Value
    Type Description
    System.Windows.Point

    HorizontalAxisLabelAlignmentProperty

    The DependencyProperty for HorizontalAxisLabelAlignment property.

    Declaration
    public static readonly DependencyProperty HorizontalAxisLabelAlignmentProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    HorizontalLineStyleProperty

    The DependencyProperty for HorizontalLineStyle property.

    Declaration
    public static readonly DependencyProperty HorizontalLineStyleProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    VerticalAxisLabelAlignmentProperty

    The DependencyProperty for VerticalAxisLabelAlignment property.

    Declaration
    public static readonly DependencyProperty VerticalAxisLabelAlignmentProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    VerticalLineStyleProperty

    The DependencyProperty for VerticalLineStyle property.

    Declaration
    public static readonly DependencyProperty VerticalLineStyleProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    HorizontalAxisLabelAlignment

    Gets or sets the alignment for the label appearing in vertical axis.

    Declaration
    public ChartAlignment HorizontalAxisLabelAlignment { get; set; }
    Property Value
    Type Description
    ChartAlignment

    ChartAlignment

    HorizontalLineStyle

    Gets or sets the style for horizontal line.

    Declaration
    public Style HorizontalLineStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Style

    IsActivated

    Gets or sets a value indicating whether the cross hair IsActivated

    Declaration
    protected bool IsActivated { get; set; }
    Property Value
    Type Description
    System.Boolean

    PointInfos

    Gets the collection of ChartPointInfo

    Declaration
    public ObservableCollection<ChartPointInfo> PointInfos { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<ChartPointInfo>

    VerticalAxisLabelAlignment

    Gets or sets the alignment for the label appearing in horizontal axis.

    Declaration
    public ChartAlignment VerticalAxisLabelAlignment { get; set; }
    Property Value
    Type Description
    ChartAlignment

    ChartAlignment

    VerticalLineStyle

    Gets or sets the style for vertical line.

    Declaration
    public Style VerticalLineStyle { get; set; }
    Property Value
    Type Description
    System.Windows.Style

    Methods

    AddElement(UIElement)

    Method implementation for Add elements in UIElement

    Declaration
    protected void AddElement(UIElement element)
    Parameters
    Type Name Description
    System.Windows.UIElement element

    AddLabel(ChartPointInfo, ChartAlignment, ChartAlignment, DataTemplate)

    Method implementatin for

    Declaration
    protected void AddLabel(ChartPointInfo obj, ChartAlignment verticalAlignment, ChartAlignment horizontalAlignment, DataTemplate template)
    Parameters
    Type Name Description
    ChartPointInfo obj
    ChartAlignment verticalAlignment
    ChartAlignment horizontalAlignment
    System.Windows.DataTemplate template

    AddLabel(Object, ChartAlignment, ChartAlignment, DataTemplate, Double, Double)

    Method implementation for add labels for Crosshair

    Declaration
    protected virtual void AddLabel(object obj, ChartAlignment verticalAlignemnt, ChartAlignment horizontalAlignment, DataTemplate template, double x, double y)
    Parameters
    Type Name Description
    System.Object obj
    ChartAlignment verticalAlignemnt
    ChartAlignment horizontalAlignment
    System.Windows.DataTemplate template
    System.Double x
    System.Double y

    AlignDefaultLabel(ChartAlignment, ChartAlignment, Double, Double, ContentControl)

    Declaration
    protected override void AlignDefaultLabel(ChartAlignment verticalAlignemnt, ChartAlignment horizontalAlignment, double x, double y, ContentControl control)
    Parameters
    Type Name Description
    ChartAlignment verticalAlignemnt
    ChartAlignment horizontalAlignment
    System.Double x
    System.Double y
    System.Windows.Controls.ContentControl control
    Overrides
    ChartBehavior.AlignDefaultLabel(ChartAlignment, ChartAlignment, Double, Double, ContentControl)

    AttachElements()

    Method implementation for AttachElements

    Declaration
    protected override void AttachElements()
    Overrides
    ChartBehavior.AttachElements()

    CloneBehavior(DependencyObject)

    Declaration
    protected override DependencyObject CloneBehavior(DependencyObject obj)
    Parameters
    Type Name Description
    System.Windows.DependencyObject obj
    Returns
    Type Description
    System.Windows.DependencyObject
    Overrides
    ChartBehavior.CloneBehavior(DependencyObject)

    DetachElements()

    Method implementation for DetachElements

    Declaration
    protected override void DetachElements()
    Overrides
    ChartBehavior.DetachElements()

    GenerateLabel(ChartPointInfo, ChartAxis)

    Method implementation for GenerateLabel for axis

    Declaration
    protected virtual void GenerateLabel(ChartPointInfo pointInfo, ChartAxis axis)
    Parameters
    Type Name Description
    ChartPointInfo pointInfo
    ChartAxis axis

    OnLayoutUpdated()

    Called when chart layout updated from chart

    Declaration
    protected override void OnLayoutUpdated()
    Overrides
    ChartBehavior.OnLayoutUpdated()

    OnMouseLeave(MouseEventArgs)

    Called when MouseLeave from Chart

    Declaration
    protected override void OnMouseLeave(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e
    Overrides
    ChartBehavior.OnMouseLeave(MouseEventArgs)

    OnMouseLeftButtonDown(MouseButtonEventArgs)

    Called when mouse left button was pressed in Chart

    Declaration
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e
    Overrides
    ChartBehavior.OnMouseLeftButtonDown(MouseButtonEventArgs)

    OnMouseLeftButtonUp(MouseButtonEventArgs)

    Called when OnMouse

    Declaration
    protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseButtonEventArgs e
    Overrides
    ChartBehavior.OnMouseLeftButtonUp(MouseButtonEventArgs)

    OnMouseMove(MouseEventArgs)

    Called when MouseMove in chart

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.MouseEventArgs e
    Overrides
    ChartBehavior.OnMouseMove(MouseEventArgs)

    OnSizeChanged(SizeChangedEventArgs)

    Called when Size Changed

    Declaration
    protected override void OnSizeChanged(SizeChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.SizeChangedEventArgs e
    Overrides
    ChartBehavior.OnSizeChanged(SizeChangedEventArgs)

    SetPosition(Point)

    Method implementation for Set positions for given point

    Declaration
    protected virtual void SetPosition(Point point)
    Parameters
    Type Name Description
    System.Windows.Point point

    Implements

    ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved