Table of Contents

Class NativeTextInput

Namespace
VpnHood.AppUi.Hosting.Avalonia
Assembly
VpnHood.AppUi.Hosting.Avalonia.dll

Provides the attached properties that ask for the platform's own input on a text box, where a host has one, as the paired browser page over plain http does.

public static class NativeTextInput
Inheritance
NativeTextInput
Inherited Members

Remarks

There the browser draws what is typed in the phone's own fonts, and takes the phone's paste and autofill, which Avalonia cannot. It is for a box a person types words or pastes into; a host without such input ignores it.

Fields

AutoCompleteProperty

Identifies the AutoComplete attached property: what the box asks the platform to offer to fill it with, by a browser's autocomplete hint, as username, current-password or one-time-code; with none, it asks for nothing to be offered, which a browser may disregard.

public static readonly AttachedProperty<string?> AutoCompleteProperty

Field Value

AttachedProperty<string>

IsPreferredProperty

Identifies the IsPreferred attached property: whether the box asks for the platform's own input.

public static readonly AttachedProperty<bool> IsPreferredProperty

Field Value

AttachedProperty<bool>

Methods

GetAutoComplete(TextBox)

Gets what a text box asks the platform to offer to fill it with.

public static string? GetAutoComplete(TextBox textBox)

Parameters

textBox TextBox

The text box.

Returns

string

The autocomplete hint, or null.

GetIsPreferred(TextBox)

Gets whether a text box asks for the platform's own input.

public static bool GetIsPreferred(TextBox textBox)

Parameters

textBox TextBox

The text box.

Returns

bool

true where it asks.

SetAutoComplete(TextBox, string?)

Sets what a text box asks the platform to offer to fill it with.

public static void SetAutoComplete(TextBox textBox, string? value)

Parameters

textBox TextBox

The text box.

value string

The autocomplete hint, or null to ask for none.

SetIsPreferred(TextBox, bool)

Sets whether a text box asks for the platform's own input.

public static void SetIsPreferred(TextBox textBox, bool value)

Parameters

textBox TextBox

The text box.

value bool

true to ask for it.