Search code examples
c#avalonia

How to store UserInput from TextBox in a variable - Avalonia UI, C#


I Would like to ask you, how can I store a value comming from User input?

When User types his Username, I would like to take it and store in a variable.


Solution

  • Because it uses MVVM the textbox should be binded to ViewModel property and it should have the value in realtime as the user inputs it.

    This should get you started with MVVM: https://www.c-sharpcorner.com/UploadFile/raj1979/simple-mvvm-pattern-in-wpf/