다음을 통해 공유


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

‘선언
Public Shared Sub MoveFocusInto ( _
    element As UIElement _
)
public static void MoveFocusInto(
    UIElement element
)

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