C# Class GitHub.Extensions.FocusHelper

显示文件 Open project: Microsoft/Git-Credential-Manager-for-Windows

Public Methods

Method Description
TryMoveFocus ( this element, FocusNavigationDirection direction ) : Task

Attempts to move focus to an element within the provided container waiting for the element to be loaded if necessary (waits max 1 second to protect against confusing focus shifts if the element gets loaded much later).

Private Methods

Method Description
TryFocus ( this element ) : Task
TryFocusImpl ( FrameworkElement element, bool>.Func focusAction ) : Task
WaitForElementLoaded ( FrameworkElement element ) : Task

Method Details

TryMoveFocus() public static method

Attempts to move focus to an element within the provided container waiting for the element to be loaded if necessary (waits max 1 second to protect against confusing focus shifts if the element gets loaded much later).
public static TryMoveFocus ( this element, FocusNavigationDirection direction ) : Task
element this The element to move focus from.
direction FocusNavigationDirection The direction to give focus.
return Task