Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Providing Data
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Collapse]Examples
    [Expand]General
    [Collapse]Creating Charts
     [Expand]Providing Data
     [Expand]Data Representation
     [Collapse]Appearance Customization
       How to: Customize a Chart's Appearance
       How to: Customize the Appearance of a Chart's Legend
       How to: Customize Gridlines and Tickmarks of an Axis
       How to: Customize the Appearance of a Pane's Scroll Bar (Runtime Sample)
       How to: Custom Draw Series
       How to: Custom Draw Series Points
       How to: Conditionally Hide Series Labels
       How to: Make Series Labels Display Custom Information
       How to: Avoid Overlapping of Series Labels
       How to: Change the Names for Auto-Created Series
       How to: Custom Draw a Crosshair Cursor
       How to: Display Axis Labels Between Tickmarks
     [Expand]Series Views
    [Expand]Chart Elements
    [Expand]End-User Interaction
    [Expand]Producing Output
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Custom Draw a Crosshair Cursor

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T333191.

This example demonstrates one of several possible way of using the ChartControl.CustomDrawCrosshair event. In this sample, the event is used to modify the legend markers of bar series.

To access crosshair element groups, use the CustomDrawCrosshairEventArgs.CrosshairElementGroups property. Elements are separated into several groups when crosshair labels are displayed for each pane. For each group, it is possible to customize the header using the CrosshairElementGroup.HeaderElement property and elements representing series using the CrosshairElementGroup.CrosshairElements property. F?or each element representing a series, you can customize its label representation using the CrosshairElement.LabelElement property and axis label using the CrosshairElement.AxisLabelElement property. For example, to modify the legend marker image, use the CrosshairLabelElement.MarkerImage property.

How would you rate this topic?​​​​​​​