Skip to main content

TextInputMethodClient Class

Definition

Assembly:Avalonia.Base
Package:Avalonia
public class TextInputMethodClient

Inheritance: object -> TextInputMethodClient

Methods

NameDescription
ExecuteContextMenuActionExecute specific context menu actions
SetPreeditText (2 overloads)Sets the non-committed input string

ExecuteContextMenuAction Method

Execute specific context menu actions

public void ExecuteContextMenuAction(Avalonia.Input.TextInput.ContextMenuAction action)

Parameters

action Avalonia.Input.TextInput.ContextMenuAction

The Avalonia.Input.TextInput.ContextMenuAction to perform

SetPreeditText overloads

SetPreeditText Method

Sets the non-committed input string

public void SetPreeditText(string preeditText)
Parameters

preeditText string

SetPreeditText Method

public void SetPreeditText(string preeditText, Nullable<int> cursorPos)
Parameters

preeditText string

cursorPos Nullable<int>

Properties

NameDescription
CursorRectangleGets the cursor rectangle relative to the TextViewVisual
SelectionGets or sets the curent selection range within current surrounding text.
SupportsPreeditIndicates if TextViewVisual is capable of displaying non-committed input on the cursor position
SupportsSurroundingTextIndicates if text input client is capable of providing the text around the cursor
SurroundingTextReturns the text around the cursor, usually the current paragraph
TextViewVisualThe visual that's showing the text

CursorRectangle Property

Gets the cursor rectangle relative to the TextViewVisual

public Avalonia.Rect CursorRectangle { get; set; }

Selection Property

Gets or sets the curent selection range within current surrounding text.

public Avalonia.Input.TextInput.TextSelection Selection { get; set; }

SupportsPreedit Property

Indicates if TextViewVisual is capable of displaying non-committed input on the cursor position

public bool SupportsPreedit { get; set; }

SupportsSurroundingText Property

Indicates if text input client is capable of providing the text around the cursor

public bool SupportsSurroundingText { get; set; }

SurroundingText Property

Returns the text around the cursor, usually the current paragraph

public string SurroundingText { get; set; }

TextViewVisual Property

The visual that's showing the text

public Avalonia.Visual TextViewVisual { get; set; }

Events

NameDescription
CursorRectangleChangedFires when the cursor rectangle has changed
InputPaneActivationRequestedFires when client requests the input panel be opened.
ResetRequestedFires when client wants to reset IME state
SelectionChangedFires when the selection has changed
SurroundingTextChangedFires when the surrounding text has changed
TextViewVisualChangedFires when the text view visual has changed

CursorRectangleChanged Event

Fires when the cursor rectangle has changed

public event EventHandler CursorRectangleChanged

InputPaneActivationRequested Event

Fires when client requests the input panel be opened.

public event EventHandler InputPaneActivationRequested

ResetRequested Event

Fires when client wants to reset IME state

public event EventHandler ResetRequested

SelectionChanged Event

Fires when the selection has changed

public event EventHandler SelectionChanged

SurroundingTextChanged Event

Fires when the surrounding text has changed

public event EventHandler SurroundingTextChanged

TextViewVisualChanged Event

Fires when the text view visual has changed

public event EventHandler TextViewVisualChanged