Freigeben über


Cursors Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Defines a set of default mouse pointer images for Silverlight.

Inheritance Hierarchy

System.Object
  System.Windows.Input.Cursors

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

Syntax

'Declaration
Public NotInheritable Class Cursors
public static class Cursors

The Cursors type exposes the following members.

Properties

  Name Description
Public propertyStatic memberSupported by Silverlight for Windows Phone Arrow Represents an Arrow Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone Eraser Represents an Eraser Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone Hand Represents a Hand Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone IBeam Represents an IBeam Cursor, which is typically used to show where the text cursor appears when the mouse is clicked.
Public propertyStatic memberSupported by Silverlight for Windows Phone None Represents a special Cursor that is invisible.
Public propertyStatic memberSupported by Silverlight for Windows Phone SizeNESW Represents a SizeNESW Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone SizeNS Represents a SizeNS Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone SizeNWSE Represents a SizeNWSE Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone SizeWE Represents a SizeWE Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone Stylus Represents a Stylus Cursor.
Public propertyStatic memberSupported by Silverlight for Windows Phone Wait Represents a WaitCursor.

Top

Remarks

This static class defines a set of default mouse pointer images common to Silverlight-based applications.

The various static properties defining cursors/mouse pointer images are used by the Cursor class, which performs type conversion on strings provided for any XAML attribute that takes type Cursor. For the XAML usage, see Cursor.

There is no Cursors.Default static property value. Instead, the default cursor is represented by setting a Cursor property value to nulla null reference (Nothing in Visual Basic). A string value of Default is permissible as a XAML attribute usage for this case, to support version compatibility. The value None is not representative of the default. None specifically declares an invisible mouse pointer, even if the input system would have used a different default for that input case.

In code, you can set Cursor value properties using one of the Cursors static property values.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

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

Platforms

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.