Table of Contents

Method Focus

Namespace
DotNetBrowser.AvaloniaUi
Assembly
DotNetBrowser.AvaloniaUi.dll

Focus(NavigationMethod, KeyModifiers)

Moves keyboard focus to this browser view.

public bool Focus(NavigationMethod method = NavigationMethod.Unspecified, KeyModifiers keyModifiers = KeyModifiers.None)

Parameters

method NavigationMethod

The method by which focus was requested.

keyModifiers KeyModifiers

The keyboard modifiers that were pressed at the time of the request.

Returns

bool

true if the input focus request was successful; otherwise, false.

Remarks

This view itself is not a focus scope stop (Focusable="False" in XAML, so the embedded browser content occupies a single Tab stop instead of two); focusing it directly is a no-op. This hides the inherited method and forwards focus to the hardware or off-screen content view instead.