menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartInteractiveBehavior - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartInteractiveBehavior

    ChartInteractiveBehavior is a class used to get the methods that are called when the pointer interactions are made in the Chart area. By using that, the user can change the behavior for different actions like OnPointerPressed, OnPointerMoved, OnPointerReleased, OnPointerReleased and etc.

    Inheritance
    System.Object
    ChartBehavior
    ChartInteractiveBehavior
    Inherited Members
    ChartBehavior.OnDoubleTapped(DoubleTappedRoutedEventArgs)
    ChartBehavior.OnHolding(HoldingRoutedEventArgs)
    ChartBehavior.OnLayoutUpdated()
    ChartBehavior.OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)
    ChartBehavior.OnManipulationDelta(ManipulationDeltaRoutedEventArgs)
    ChartBehavior.OnManipulationStarted(ManipulationStartedRoutedEventArgs)
    ChartBehavior.OnPointerEntered(PointerRoutedEventArgs)
    ChartBehavior.OnPointerExited(PointerRoutedEventArgs)
    ChartBehavior.OnPointerMoved(PointerRoutedEventArgs)
    ChartBehavior.OnPointerPressed(PointerRoutedEventArgs)
    ChartBehavior.OnPointerReleased(PointerRoutedEventArgs)
    ChartBehavior.OnPointerWheelChanged(PointerRoutedEventArgs)
    ChartBehavior.OnRightTapped(RightTappedRoutedEventArgs)
    ChartBehavior.OnTapped(TappedRoutedEventArgs)
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.Chart.WinUI.dll
    Syntax
    public class ChartInteractiveBehavior : ChartBehavior
    Remarks

    OnPointerPressed() - gets called when the user makes the initial contact of a user's pointer or cursor input device with the Chart Area.

    OnPointerMoved() - gets called when a user's pointer or cursor input device is in contact with the Chart area and moves across its surface.

    OnPointerReleased() - gets called when a user lifts their pointer or releases their cursor input from the Chart area.

    To use this method, create the class inherited by the ChartInteractiveBehavior class.

    Then, create the instance for that class, and it must be added in the chart's InteractiveBehavior as per the following code sample.

    Examples
    • ChartInteractionExt.cs
    • MainPage.xaml
    • MainPage.xaml.cs
    public class ChartInteractionExt : ChartInteractiveBehavior
    {
       <!--omitted for brevity-->
    }
    <chart:SfCartesianChart>
    
        <!--omitted for brevity-->
    
        <chart:SfCartesianChart.InteractiveBehavior>
             <local:ChartInteractionExt/>
        </chart:SfCartesianChart.InteractiveBehavior>
    
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ChartInteractionExt interaction = new ChartInteractionExt();
    chart.ChartInteractiveBehavior = interaction;

    Constructors

    ChartInteractiveBehavior()

    Declaration
    public ChartInteractiveBehavior()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved