Cursor 類別

定義

表示用來做為滑鼠指標的影像。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
繼承
Cursor
屬性
實作

範例

如何:變更游標類型How to: Change the Cursor Type

備註

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 Attribute UsageXAML Attribute Usage

<object property="cursorName"/>  

XAML 值XAML Values

cursorNamecursorName
Cursors類別中其中一個預先定義的資料指標名稱。The name of one of the predefined cursors in the Cursors class.

建構函式

Cursor(Stream)

從指定的 Cursor 初始化 Stream 類別的新執行個體。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.

方法

Dispose()

釋放 Cursor 類別所使用的資源。Releases the resources used by the Cursor class.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Finalize()

完成物件以釋放資源,並執行其他清除作業。Finalizes the object to free resources and perform other cleanup operations.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回 Cursor 的字串表示。Returns the string representation of the Cursor.

適用於

另請參閱