FrameworkContentElement::ForceCursor Property
Gets or sets a value indicating whether this FrameworkContentElement should force the user interface (UI) to render the cursor as declared by this instance's Cursor property.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
<object ForceCursor="bool" .../>
Property Value
Type: System::Booleantrue to force cursor presentation while over this element to use this instance's setting for the cursor (including on all child elements); otherwise false. The default value is false.
Setting this property to true will override the cursor preferences established by child elements. Doing so in general application UI might be confusing for the user, particularly if child elements are attempting to specify cursors. Setting ForceCursor is more appropriate in control subclassing or compositing scenarios.
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>
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.