Cursor Class

Definition

代表用于鼠标指针的图像。Represents the image used for the mouse pointer.

public ref class Cursor sealed : IDisposable
[System.ComponentModel.TypeConverter(typeof(System.Windows.Input.CursorConverter))]
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public sealed class Cursor : IDisposable
type Cursor = class
    interface IDisposable
Public NotInheritable Class Cursor
Implements IDisposable
Inheritance
Cursor
Attributes
Implements

Examples

如何:更改游标类型How to: Change the Cursor Type

Remarks

Cursors 类包含一组默认游标。The Cursors class contains a set of default cursors.

在部分信任环境中运行时,只允许在 Cursors 类中定义的默认游标。When running in Partial Trust, only the default cursors defined in the Cursors class are allowed.

XAML 特性用法XAML Attribute Usage

<object property="cursorName"/>  

XAML 值XAML Values

cursorNamecursorName
Cursors 类中预定义的游标之一的名称。The name of one of the predefined cursors in the Cursors class.

Constructors

Cursor(Stream)

从指定的 Stream 初始化 Cursor 类的新实例。Initializes a new instance of the Cursor class from the specified Stream.

Cursor(Stream, Boolean)

初始化 Cursor 类的新实例。Initializes a new instance of the Cursor class.

Cursor(String)

从指定的 .ani 或 .cur 文件中初始化 Cursor 类的新实例。Initializes a new instance of the Cursor class from the specified .ani or a .cur file.

Cursor(String, Boolean)

初始化 Cursor 类的新实例。Initializes a new instance of the Cursor class.

Methods

Dispose()

释放 Cursor 类使用的资源。Releases the resources used by the Cursor class.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize()

确定对象以释放资源并执行其他清理操作。Finalizes the object to free resources and perform other cleanup operations.

GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

返回 Cursor 的字符串表示形式。Returns the string representation of the Cursor.

Applies to

See also