ForceCursor Property

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.

Namespace:   System.Windows
Assembly:  PresentationFramework (in PresentationFramework.dll)

public bool ForceCursor { get; set; }

Property Value

Type: System.Boolean

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. 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.

Identifier field


Metadata properties set to true


Legacy Code Example

The following example forces the cursor while over the element.

Code snippet is not found. Confirm that the code snippet name 'ForceCursor' is correct.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft