Sdílet prostřednictvím


ElementReferenceExtensions.FocusAsync Metoda

Definice

Přetížení

FocusAsync(ElementReference)

Dává fokus na prvek vzhledem k jeho ElementReference.

FocusAsync(ElementReference, Boolean)

Dává fokus na prvek vzhledem k jeho ElementReference.

FocusAsync(ElementReference)

Zdroj:
ElementReferenceExtensions.cs
Zdroj:
ElementReferenceExtensions.cs
Zdroj:
ElementReferenceExtensions.cs
Zdroj:
ElementReferenceExtensions.cs

Dává fokus na prvek vzhledem k jeho ElementReference.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::ValueTask FocusAsync(Microsoft::AspNetCore::Components::ElementReference elementReference);
public static System.Threading.Tasks.ValueTask FocusAsync (this Microsoft.AspNetCore.Components.ElementReference elementReference);
static member FocusAsync : Microsoft.AspNetCore.Components.ElementReference -> System.Threading.Tasks.ValueTask
<Extension()>
Public Function FocusAsync (elementReference As ElementReference) As ValueTask

Parametry

elementReference
ElementReference

Odkaz na prvek, na který se má zaměřit.

Návraty

Představuje ValueTask asynchronní operaci fokusu.

Platí pro

FocusAsync(ElementReference, Boolean)

Zdroj:
ElementReferenceExtensions.cs
Zdroj:
ElementReferenceExtensions.cs
Zdroj:
ElementReferenceExtensions.cs

Dává fokus na prvek vzhledem k jeho ElementReference.

public static System.Threading.Tasks.ValueTask FocusAsync (this Microsoft.AspNetCore.Components.ElementReference elementReference, bool preventScroll);
static member FocusAsync : Microsoft.AspNetCore.Components.ElementReference * bool -> System.Threading.Tasks.ValueTask
<Extension()>
Public Function FocusAsync (elementReference As ElementReference, preventScroll As Boolean) As ValueTask

Parametry

elementReference
ElementReference

Odkaz na prvek, na který se má zaměřit.

preventScroll
Boolean

Hodnota Boolean označující, jestli má prohlížeč posouvat dokument, aby se nově zaměřený prvek zobrazil. Hodnota false pro preventScroll (výchozí) znamená, že prohlížeč posune prvek do zobrazení po zaostření. Pokud je vlastnost preventScroll nastavená na hodnotu true, nedojde k posouvání.

Návraty

Představuje ValueTask asynchronní operaci fokusu.

Platí pro