Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想问你,我如何存储来自用户输入的值?
当用户输入他的用户名时,我想把它存储在一个变量中。
因为它使用 MVVM,所以文本框应该绑定到 ViewModel 属性,并且它应该在用户输入时实时具有值。
这应该让您开始使用 MVVM: https ://www.c-sharpcorner.com/UploadFile/raj1979/simple-mvvm-pattern-in-wpf/