Skip to main content

Class FocusableExtensions

Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll

Provides extension methods for Focusable.

public static class FocusableExtensions

Inheritance​

object ← FocusableExtensions

Methods​

BlurSelf<T>(T)​

Removes focus from the element via Blur.

public static T BlurSelf<T>(this T element) where T : Focusable

Parameters​

element T

The element to modify.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

FocusSelf<T>(T)​

Gives focus to the element via Focus.

public static T FocusSelf<T>(this T element) where T : Focusable

Parameters​

element T

The element to modify.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

IsFocused(Focusable)​

Returns whether the element currently has keyboard focus.

public static bool IsFocused(this Focusable element)

Parameters​

element Focusable

The element to check.

Returns​

bool

true if the element holds keyboard focus; otherwise, false.

SetDelegatesFocus<T>(T, bool)​

Sets delegatesFocus.

public static T SetDelegatesFocus<T>(this T element, bool value) where T : Focusable

Parameters​

element T

The element to modify.

value bool

When true, focus is delegated to the children.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetFocusable<T>(T, bool)​

Sets focusable.

public static T SetFocusable<T>(this T element, bool value) where T : Focusable

Parameters​

element T

The element to modify.

value bool

When true, the element can receive focus.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

SetTabIndex<T>(T, int)​

Sets tabIndex.

public static T SetTabIndex<T>(this T element, int value) where T : Focusable

Parameters​

element T

The element to modify.

value int

The tab index to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.