New to Telerik UI for WPF? Download free 30-day trial

Display Trackball Info on Right Mouse Click


Product Version 2019.2 624
Product RadChartView for WPF


How to display the ChartView trackball on right mouse button click.


Subscribe to the PositionChanging event of the ChartTrackBallBehavior and reset the last position if the mouse right button wasn't not clicked. Then subscribe to the MouseRightButtonDown event of RadCartesianChart and set the Position property of the behavior manually.

    <telerik:ChartTrackBallBehavior PositionChanging="ChartTrackBallBehavior_PositionChanging" x:Name="trackballBehavior" /> 

public partial class MainWindow : Window 
    private bool isManualPositionChange = false; 
    public MainWindow() 
        this.trackballBehavior.Position = new Point(100, 321); 
    private void ChartTrackBallBehavior_PositionChanging(object sender, Telerik.Windows.Controls.ChartView.TrackBallPositionChangingEventArgs e) 
        if (e.NewPosition != e.PreviousPosition && !isManualPositionChange) 
            e.NewPosition = e.PreviousPosition; 
        this.isManualPositionChange = false; 
    private void RadCartesianChart_MouseRightButtonDown(object sender, MouseButtonEventArgs e) 
        isManualPositionChange = true; 
        this.trackballBehavior.Position = e.GetPosition(this.chart); 
In this article