Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FocusManager Class

Provides utility methods related to element focus, without the need to handle focus-related events.

System.Object
  System.Windows.Input.FocusManager

Namespace:  System.Windows.Input
Assembly:  System.Windows (in System.Windows.dll)

public static class FocusManager

  NameDescription
Public methodStatic memberSupported by Silverlight for Windows PhoneGetFocusedElement()Queries the Silverlight focus system to determine which object has focus.
Public methodStatic memberGetFocusedElement(DependencyObject)Gets the element with focus within the specified focus scope.
Top

Silverlight focus has the characteristic that while the focus-reporting events GotFocus and LostFocus are raised asynchronously, the focus returned by GetFocusedElement is determined synchronously. This design attempts to loosen constraints on runtime adjustments to element trees that could result from having to wait for the focus to be determined and moved. For cases where determining the synchronous focus is critical, use the GotFocus and LostFocus events as a cue, but then call FocusManager.GetFocusedElement to verify the synchronous focus.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft