XYDiagram2D.Zoom Event
In This Article
Occurs after an XYDiagram2D has been zoomed in or out.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.2.dll
NuGet Package: DevExpress.Wpf.Charts
#Declaration
public event XYDiagram2DZoomEventHandler Zoom
#Event Data
The Zoom event's data class is XYDiagram2DZoomEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Axis |
Gets the X-axis, along which zooming has been performed. |
Axis |
Gets the Y-axis, along which the zooming 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 zooming has been performed. |
Routed |
Gets or sets the Routed |
Source |
Gets or sets a reference to the object that raised the event.
Inherited from Routed |
Type | Gets the zooming type, which specifies zooming 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.Zoom
event to track range changes when a user zooms in to or out of the chart:
private void XYDiagram2D_Zoom(object sender, DevExpress.Xpf.Charts.XYDiagram2DZoomEventArgs 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