Manager. Set IsFocus Scope(DependencyObject, Boolean) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the specified DependencyObject as a focus scope.
public: static void SetIsFocusScope(System::Windows::DependencyObject ^ element, bool value);
public static void SetIsFocusScope (System.Windows.DependencyObject element, bool value);
static member SetIsFocusScope : System.Windows.DependencyObject * bool -> unit
Public Shared Sub SetIsFocusScope (element As DependencyObject, value As Boolean)
The element to make a focus scope.
element is a focus scope; otherwise,
The follow example makes an element a focus scope by using SetIsFocusScope.
StackPanel focuseScope2 = new StackPanel(); FocusManager.SetIsFocusScope(focuseScope2, true);
Dim focuseScope2 As New StackPanel() FocusManager.SetIsFocusScope(focuseScope2, True)
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
For more information on focus, keyboard focus, and logical focus, see the Input Overview.