Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Cursor Class

Represents the image used for the mouse pointer.

System.Object
  System.Windows.Input.Cursor

Namespace:  System.Windows.Input
Assembly:  System.Windows (in System.Windows.dll)

public sealed class Cursor
<object property="cursorName"/>

XAML Values

cursorName

The name of one of the predefined mouse pointer static properties in the Cursors class, or the literal string Default. See Remarks.

 

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

arrow cursor

Hand

A hand mouse pointer. This shape typically indicates that the mouse pointer is over a link.

The Hand mouse pointer

hand cursor

Wait

A wait (or hourglass) mouse pointer. This mouse pointer typically indicates that the runtime is busy performing an operation.

The Wait mouse pointer

wait cursor

IBeam

An I-beam mouse pointer. This mouse pointer typically indicates that text can be manipulated or selected.

The I-beam mouse pointer

i-beam cursor

Stylus

A stylus mouse pointer. This mouse pointer typically indicates that pen input is being captured.

The Stylus mouse pointer

stylus cursor

Eraser

An eraser mouse pointer. This mouse pointer typically indicates that previous pen input is being deliberately erased.

The Eraser mouse pointer

eraser cursor

None

No mouse pointer is used.

No mouse pointer

no cursor

The Cursor type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhoneEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneToStringReturns the string representation of the Cursor. (Overrides Object.ToString().)
Top

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.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft