ScrollBarEventArgs.IsHandled Property

.NET Framework (current version)

Gets or sets a flag that indicates whether to cancel the default behavior of specific scrollbar events.

Namespace:   System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

public bool IsHandled { get; set; }

Property Value

Type: System.Boolean

true if the default behavior of the event should be cancelled, otherwise false.

This property is exposed in the AxisScrollBarClicked event of the root Chart object.

This property can be used to cancel the default behavior on specific scrollbar events.

If you click on a scrollbar button, the default manipulation of the view will occur.

The following list summarizes this default behavior:

  • If the user clicks the Reset/Zoom button, the previous view will be displayed.

  • If the user clicks in the scrollbar background—that is, not on the scrolling thumb, otherwise known as the tracker— large increments and/or decrements of the scrollbar will occur, with the increment and/or decrement size being determined by the Size property.

To turn off these default behaviors, set the IsHandled property to true after providing custom logic in the AxisScrollBarClicked event.

.NET Framework
Available since 4.0
Return to top