FrameworkContentElement.ForceCursor 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個值,指示是否 FrameworkContentElement 應該強制使用者介面(UI)依照該實例 Cursor 屬性宣告的游標來呈現。
public:
property bool ForceCursor { bool get(); void set(bool value); };
public bool ForceCursor { get; set; }
member this.ForceCursor : bool with get, set
Public Property ForceCursor As Boolean
屬性值
true 強制在該元素上方時,游標顯示使用該實例的游標設定(包括所有子元素);否則 false。 預設值為 false。
範例
以下範例強制游標在元素上方。
<StackPanel
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<StackPanel Name="CursorForced" ForceCursor="true" Cursor="Hand">
<Label>Cursors Forced</Label>
<TextBox>Fill me in!</TextBox>
</StackPanel>
<StackPanel Name="CursorNotForced">
<Label>Cursors Not Forced</Label>
<TextBox>Fill me in!</TextBox>
</StackPanel>
</StackPanel>
備註
將此屬性設為 會 true 覆蓋子元素所建立的游標偏好。 在一般應用程式介面中這麼做可能會讓使用者感到困惑,尤其是當子元素試圖指定游標時。 設定 ForceCursor 在控制子類別或合成場景中更為適用。
相依財產資訊
| 項目 | 價值 |
|---|---|
| 識別碼欄位 | ForceCursorProperty |
元資料屬性設為 true |
沒有 |