Export (0) Print
Expand All

ScrollBarEventArgs Class

Used as a parameter object in the AxisScrollBarClicked of the root Chart object.

System.Object
  System.EventArgs
    System.Windows.Forms.DataVisualization.Charting.ScrollBarEventArgs

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

public class ScrollBarEventArgs : EventArgs

The ScrollBarEventArgs type exposes the following members.

  NameDescription
Public methodScrollBarEventArgsInitializes a new instance of the ScrollBarEventArgs class with the specified axis, X and Y positions of the mouse cursor, and type of button clicked.
Top

  NameDescription
Public propertyAxisGets the Axis object that a scrollbar belongs to.
Public propertyButtonTypeGets the type of scrollbar button that the end-user clicked.
Public propertyChartAreaGets the ChartArea object that the scrollbar belongs to.
Public propertyIsHandledGets or sets a flag that indicates whether to cancel the default behavior of specific scrollbar events.
Public propertyMousePositionXGets the X position of the mouse cursor at the time the AxisScrollBarClicked event was raised.
Public propertyMousePositionYGets the Y position of the mouse cursor at the time the AxisScrollBarClicked event was raised.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The ScrollBarEventArgs class is exposed as the e parameter in the AxisScrollBarClicked event.

The ScrollBarEventArgs class contains the following properties:

  • The ChartArea property, which is used to get the ChartArea object that the event was raised for. The Name property gets the name of the chart area; other chart area properties can also be set.

  • The Axis property, which is used to get the Axis object that the scrollbar belongs to, using the AxisName property. Other Axis properties can also be set.

  • The ButtonType property, which is used to get the scrollbar button that the end-user clicked.

  • The IsHandled property, which determines if the Chart control cancels default behavior of the scrollbar button after the code in the AxisScrollBarClicked event completes execution.

  • The MousePositionX property, which represents the X position of the mouse cursor at the time the end-user clicked the scrollbar element.

  • The MousePositionY property, which represents the Y-position of the mouse cursor at the time the end-user clicked the scrollbar element.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft