Delen via


FocusHelper Class

Manages focus tasks.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.PlatformUI.FocusHelper

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

Syntax

'Declaration
Public NotInheritable Class FocusHelper
public static class FocusHelper
public ref class FocusHelper abstract sealed
[<AbstractClass>]
[<Sealed>]
type FocusHelper =  class end
public final class FocusHelper

The FocusHelper type exposes the following members.

Methods

  Name Description
Public methodStatic member FocusPossiblyUnloadedElement Either sends focus to the FrameworkElement immediately or delays focusing until the FrameworkElement is loaded. The last element pending focus on Loaded will be focused and all previous FrameworkElements will not be focused.
Public methodStatic member IsKeyboardFocusWithin(IntPtr) Determines whether WPF or Win32 keyboard focus is within the specified HWND.
Public methodStatic member IsKeyboardFocusWithin(UIElement) Determines whether WPF or Win32 keyboard focus is within the specified element.
Public methodStatic member MoveFocusInto 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.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.PlatformUI Namespace