FrameworkContentElement.ForceCursor Özellik
Tanım
Bunun FrameworkContentElement , bu kullanıcı arabirimi (UI)user interface (UI) Örneğin özelliği tarafından bildirildiği şekilde imleci işlemeye zorlanıp zorlanmayacağını gösteren bir değer alır veya ayarlar Cursor .Gets or sets a value indicating whether this FrameworkContentElement should force the kullanıcı arabirimi (UI)user interface (UI) to render the cursor as declared by this instance's Cursor property.
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
Özellik Değeri
true
imleç sunusunu bu öğenin üzerindeyken, imleç için bu örneğin tüm alt öğelerine dahil olmak üzere bu örnek ayarını kullanacak şekilde zorlamak için; Aksi takdirde false
.true
to force cursor presentation while over this element to use this instance's setting for the cursor (including on all child elements); otherwise false
. Varsayılan değer: false
.The default value is false
.
Örnekler
Aşağıdaki örnek, öğesi sırasında imleci zorlar.The following example forces the cursor while over the element.
<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>
Açıklamalar
Bu özelliğin olarak ayarlanması true
, alt öğeler tarafından belirlenen imleç tercihlerini geçersiz kılar.Setting this property to true
will override the cursor preferences established by child elements. Kullanıcı arabirimiUIÖzellikle alt öğeler imleçleri belirtmeye çalışıyorsa, Genel uygulamada bunu yapmak Kullanıcı için kafa karıştırıcı olabilir.Doing so in general application Kullanıcı arabirimiUI might be confusing for the user, particularly if child elements are attempting to specify cursors. Ayar ForceCursor , denetim altsınıflama veya birleştirme senaryolarında daha uygundur.Setting ForceCursor is more appropriate in control subclassing or compositing scenarios.
Bağımlılık Özelliği BilgileriDependency Property Information
Tanımlayıcı alanıIdentifier field | ForceCursorProperty |
Meta veri özellikleri olarak ayarlandı true Metadata properties set to true |
YokNone |