Share via


FocusHelper.MoveFocusInto Method

Uses the MoveFocus method to try to move WPF focus to the first valid focusable element inside the given UIElement, after first enduring that WPF will not attempt to change focus because of a cross- HwndSource focus change.

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaration
Public Shared Sub MoveFocusInto ( _
    element As UIElement _
)
public static void MoveFocusInto(
    UIElement element
)
public:
static void MoveFocusInto(
    UIElement^ element
)
static member MoveFocusInto : 
        element:UIElement -> unit
public static function MoveFocusInto(
    element : UIElement
)

Parameters

Remarks

If MoveFocus fails to move focus into the element, focus will be cleared by invoking ClearFocus to clear WPF focus and using SetFocus to focus the HWND of the HwndSource containing the element.

.NET Framework Security

See Also

Reference

FocusHelper Class

Microsoft.VisualStudio.PlatformUI Namespace