Cursor Class
Represents the image used for the mouse pointer.
Namespace: System.Windows.Input
Assembly: System.Windows (in System.Windows.dll)
<object property="cursorName"/>
XAML Values
Name | Description |
|---|---|
Default | An element expresses no mouse pointer preference. If the element's parent specifies a mouse pointer, that mouse pointer is displayed. |
Arrow | An arrow mouse pointer. This is typically the default mouse pointer. The Arrow mouse pointer ![]() |
Hand | A hand mouse pointer. This shape typically indicates that the mouse pointer is over a link. The Hand mouse pointer ![]() |
Wait | A wait (or hourglass) mouse pointer. This mouse pointer typically indicates that the runtime is busy performing an operation. The Wait mouse pointer ![]() |
IBeam | An I-beam mouse pointer. This mouse pointer typically indicates that text can be manipulated or selected. The I-beam mouse pointer ![]() |
Stylus | A stylus mouse pointer. This mouse pointer typically indicates that pen input is being captured. The Stylus mouse pointer ![]() |
Eraser | An eraser mouse pointer. This mouse pointer typically indicates that previous pen input is being deliberately erased. The Eraser mouse pointer ![]() |
None | No mouse pointer is used. No mouse pointer ![]() |
The Cursor type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (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 the string representation of the Cursor. (Overrides Object.ToString().) |
The Cursors class defines a set of default mouse pointers as static properties. The Cursor class keeps a static value internally. That static value is set either by the system or by specifically setting properties that take a Cursor in XAML or code.
In Silverlight 1.0 or the JavaScript API for Silverlight, the Cursors values are an enumeration (and are actually named MouseCursor). In Silverlight 5 or the managed API, the Cursors values are static property values. In WPF, the cursor/mouse pointer image choice is extensible under full trust. Extensibility for cursors is not enabled in Silverlight 5; you must use the images that correspond to the static property values.
There is no Cursors.Default static property value. Instead, the default cursor is represented in code by setting a Cursor property value to null. A value of "Default" is permissible as a XAML attribute usage for this case, mainly to support previous version compatibility. "Default" and "None" are not equivalent.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.









