diff --git a/src/Avalonia.Base/Input/TextInput/TextInputMethodClient.cs b/src/Avalonia.Base/Input/TextInput/TextInputMethodClient.cs index d633fb2e46..7cf3752057 100644 --- a/src/Avalonia.Base/Input/TextInput/TextInputMethodClient.cs +++ b/src/Avalonia.Base/Input/TextInput/TextInputMethodClient.cs @@ -59,22 +59,22 @@ namespace Avalonia.Input.TextInput /// public virtual void SetPreeditText(string? preeditText) { } - protected virtual void OnTextViewVisualChanged() + protected virtual void RaiseTextViewVisualChanged() { TextViewVisualChanged?.Invoke(this, EventArgs.Empty); } - protected virtual void OnCursorRectangleChanged() + protected virtual void RaiseCursorRectangleChanged() { CursorRectangleChanged?.Invoke(this, EventArgs.Empty); } - protected virtual void OnSurroundingTextChanged() + protected virtual void RaiseSurroundingTextChanged() { SurroundingTextChanged?.Invoke(this, EventArgs.Empty); } - protected virtual void OnSelectionChanged() + protected virtual void RaiseSelectionChanged() { SelectionChanged?.Invoke(this, EventArgs.Empty); } diff --git a/src/Avalonia.Controls/TextBoxTextInputMethodClient.cs b/src/Avalonia.Controls/TextBoxTextInputMethodClient.cs index 9d0fbd1a8c..3c86471fbb 100644 --- a/src/Avalonia.Controls/TextBoxTextInputMethodClient.cs +++ b/src/Avalonia.Controls/TextBoxTextInputMethodClient.cs @@ -104,7 +104,7 @@ namespace Avalonia.Controls _parent.SelectionStart = selectionStart; _parent.SelectionEnd = selectionEnd; - OnSelectionChanged(); + RaiseSelectionChanged(); } } @@ -132,19 +132,19 @@ namespace Avalonia.Controls { oldPresenter.ClearValue(TextPresenter.PreeditTextProperty); - oldPresenter.CaretBoundsChanged -= (s,e) => OnCursorRectangleChanged(); + oldPresenter.CaretBoundsChanged -= (s,e) => RaiseCursorRectangleChanged(); } _presenter = presenter; if (_presenter != null) { - _presenter.CaretBoundsChanged += (s, e) => OnCursorRectangleChanged(); + _presenter.CaretBoundsChanged += (s, e) => RaiseCursorRectangleChanged(); } - OnTextViewVisualChanged(); + RaiseTextViewVisualChanged(); - OnCursorRectangleChanged(); + RaiseCursorRectangleChanged(); } public override void SetPreeditText(string? preeditText) @@ -184,12 +184,12 @@ namespace Avalonia.Controls { if (e.Property == TextBox.TextProperty) { - OnSurroundingTextChanged(); + RaiseSurroundingTextChanged(); } if (e.Property == TextBox.SelectionStartProperty || e.Property == TextBox.SelectionEndProperty) { - OnSelectionChanged(); + RaiseSelectionChanged(); } } }