Export (0) Print
Expand All

UIElement3D.IsFocused Property

Gets a value that determines whether this element has logical focus.

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

public bool IsFocused { get; }

Property Value

Type: System.Boolean
true if this element has logical focus; otherwise, false.

Identifier field

IsFocusedProperty

Metadata properties set to true

None

Logical focus might differ from keyboard focus if an application has multiple focus divisions, such as between menu contents and the remainder of the application. In this scenario, keyboard focus can only be on one element of the application UI, however, certain elements in other focus divisions might still retain logical focus. For more information on logical focus, see Focus Overview.

You do not set focus by setting this property (it is read-only). The typical use for this property is to use it as a dependency property for a Setter or EventTrigger. To set focus programmatically, call Focus. Focus can also be set by user action or by control implementations, which possibly include mouse capture behavior.

IsFocused is introduced in the .NET Framework version 3.5. For more information, see .NET Framework Versions and Dependencies.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1, 3.0 SP1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft