You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
From the customer's point of view, it would be brutally useful to know in advance what result is expected by the input.
This would be helpful for designing custom input controls based on TextBox.
As of now, it is still achievable to predict the expected Text by considering the CaretPosition, Selection, Length and so, but I would instead rely on Avalonia devs' solution, which feels saver as you guys definitely know better this than anyone else.
It's not clear what you are asking. It sounds to me like you want text prediction features. Usually that comes with input systems and is backed by a reasonably powerful AI. All of that is out of scope for a UI framework.
If my understanding is correct I think this should be closed as out of scope honestly.
In the case of a TextBox whenever a new character is entered, you will see the OnTextInput even called with a TextInputEventArgs in parameters.
I am talking about the TextInputEventArgs which could have another property called ExpectedText, because as of now the existing Text property stands for the new input that was just entered.
Your TextBox's text is: Avaloni (There is no selection, caret is end the end)
The next character you enter is a.
OnTextInput fires with TextInputEventArgs where Text = "a".
In this case, the ExpectedText property could predict that if the event goes through the final Text in the TextBox is going to be Avalonia.
Why is this helpful? It would be much easier to build custom controls that serve a specific task and are strict on the inputs.
As is said, currently this feature is doable on the customer side (because we are doing it), but it is safe to say that the Avalonia developers can calculate the expected text much better, as they know all to factors that need to be taken into account.
Is your feature request related to a problem? Please describe.
From the customer's point of view, it would be brutally useful to know in advance what result is expected by the input.
This would be helpful for designing custom input controls based on TextBox.
As of now, it is still achievable to predict the expected Text by considering the CaretPosition, Selection, Length and so, but I would instead rely on Avalonia devs' solution, which feels saver as you guys definitely know better this than anyone else.
Describe the solution you'd like
Avalonia/src/Avalonia.Base/Input/TextInputEventArgs.cs
Lines 1 to 9 in 410b46e
Add a new
ExpectedText
string property toTextInputEventArgs
, that predicts the final text.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: