Editare

Partajați prin


ViewEventArgs Class

Definition

Provides event data that is used as a parameter object in the AxisViewChanged and AxisViewChanging events of the root Chart object.

public ref class ViewEventArgs : EventArgs
public class ViewEventArgs : EventArgs
type ViewEventArgs = class
    inherit EventArgs
Public Class ViewEventArgs
Inherits EventArgs
Inheritance
ViewEventArgs

Remarks

This class is exposed as the e parameter in the AxisViewChanged and AxisViewChanging events. The AxisViewChanging event is raised just before a new view is displayed, as a result of the end-user clicking and dragging in a chart area. The AxisViewChanged event is raised just after the new view is created.

It is important to note that the position and size of a view cannot be set in the AxisViewChanged event because in this case the view is already created.

The ViewEventArgs class contains the following properties:

  • The ChartArea property, which is used to get the ChartArea object in which the view is being displayed. 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 with which the view is associated. To determine the type of axis, which can be X, Y, X2 or Y2, use the AxisName property. Other axis properties can also be set.

  • The NewPosition property, which represents the new position of a view.

  • The NewSize property, which represents the new size of a view.

  • The NewSizeType property, which represents the unit of measurement for the size of a view.

Constructors

ViewEventArgs(Axis, Double)

Initializes a new instance of the ViewEventArgs class with the specified axis and newPosition parameters.

ViewEventArgs(Axis, Double, Double, DateTimeIntervalType)

Initializes a new instance of the ViewEventArgs class with the specified axis, newPosition, newSize and newSizeType parameters.

Properties

Axis

Gets the Axis object that a view belongs to.

ChartArea

Gets the ChartArea object that a view belongs to.

NewPosition

Gets the new position of a view along an axis.

NewSize

Gets or sets the size of a view along an axis.

NewSizeType

Gets the unit of measurement for the new size of a view.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to