TextInputMethodClient Class
Definition
public class TextInputMethodClient
Methods
| Name | Description |
|---|---|
| ExecuteContextMenuAction | Execute 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
| Name | Description |
|---|---|
| CursorRectangle | Gets the cursor rectangle relative to the TextViewVisual |
| Selection | Gets or sets the curent selection range within current surrounding text. |
| SupportsPreedit | Indicates if TextViewVisual is capable of displaying non-committed input on the cursor position |
| SupportsSurroundingText | Indicates if text input client is capable of providing the text around the cursor |
| SurroundingText | Returns the text around the cursor, usually the current paragraph |
| TextViewVisual | The 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
| Name | Description |
|---|---|
| CursorRectangleChanged | Fires when the cursor rectangle has changed |
| InputPaneActivationRequested | Fires when client requests the input panel be opened. |
| ResetRequested | Fires when client wants to reset IME state |
| SelectionChanged | Fires when the selection has changed |
| SurroundingTextChanged | Fires when the surrounding text has changed |
| TextViewVisualChanged | Fires 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