Redigera

Dela via


FocusManager.GetIsFocusScope(DependencyObject) Method

Definition

Determines whether the specified DependencyObject is a focus scope.

public:
 static bool GetIsFocusScope(System::Windows::DependencyObject ^ element);
public static bool GetIsFocusScope (System.Windows.DependencyObject element);
static member GetIsFocusScope : System.Windows.DependencyObject -> bool
Public Shared Function GetIsFocusScope (element As DependencyObject) As Boolean

Parameters

element
DependencyObject

The element from which to read the attached property.

Returns

true if IsFocusScope is set to true on the specified element; otherwise, false.

Remarks

A focus scope is a container element that keeps track of the FocusManager.FocusedElement within its scope. By default, the Window class is a focus scope as are the Menu, ContextMenu, and ToolBar classes. An element that is a focus scope has IsFocusScope set to true.

For more information on focus, keyboard focus, and logical focus, see the Input Overview.

Applies to