How do I pass the information from View to ViewModel with DelegateCommand?

前端 未结 5 1611
感情败类
感情败类 2021-02-02 18:16

In my View, I have a button.

When the user clicks this button, I want to have the ViewModel save the context of the TextBlock in the database.



        
5条回答
  •  一生所求
    2021-02-02 18:33

    You're asking about passing data via the button Command.

    What you actually want, I think, is to bind your Textbox's text to a public property in your ViewModel:

    
    
    

提交回复
热议问题