XYDiagram2D.Scroll Event
In This Article
Occurs after an XYDiagram2D is scrolled.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.2.dll
NuGet Package: DevExpress.Wpf.Charts
#Declaration
public event XYDiagram2DScrollEventHandler Scroll
#Event Data
The Scroll event's data class is XYDiagram2DScrollEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Axis |
Gets the X-axis, along which the scrolling has been performed. |
Axis |
Gets the Y-axis, along which the scrolling has been performed. |
Handled |
Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
Inherited from Routed |
New |
Obsolete. Gets the new value of the Axis. property for the X-axis.
|
New |
Obsolete. Gets the new value of the Axis. property for the Y-axis.
|
New |
Gets the new value of the Axis2D. |
New |
Gets the new value of the Axis2D. |
Old |
Obsolete. Gets the old value of the Axis. property for the X-axis.
|
Old |
Obsolete. Gets the old value of the Axis. property for the Y-axis.
|
Old |
Gets the old value of the Axis2D. |
Old |
Gets the old value of the Axis2D. |
Original |
Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
Inherited from Routed |
Pane | Gets a pane along which scrolling has been performed. |
Routed |
Gets or sets the Routed |
Scroll |
Gets the scrolling orientation, i. |
Source |
Gets or sets a reference to the object that raised the event.
Inherited from Routed |
Type | Gets the scrolling type, which specifies scrolling characteristics. |
The event data class exposes the following methods:
Method | Description |
---|---|
Invoke |
When overridden in a derived class, provides a way to invoke event handlers in a type-specific way, which can increase efficiency over the base implementation.
Inherited from Routed |
On |
When overridden in a derived class, provides a notification callback entry point whenever the value of the Source property of an instance changes.
Inherited from Routed |
#Remarks
You can use the XYDiagram2D.Scroll event to track range changes when a user scrolls the chart.
private void XYDiagram2D_Scroll(object sender, XYDiagram2DScrollEventArgs e) {
// Get new range limits.
object newXRangeMin = e.NewXRange.MinValue;
object newXRangeMax = e.NewXRange.MaxValue;
object newYRangeMin = e.NewYRange.MinValue;
object newYRangeMax = e.NewYRange.MaxValue;
// Add your custom logic here.
}
See Also