How can i access a control in mvvm model in viewmodel?

后端 未结 4 751
一向
一向 2020-12-22 18:38

I have a WPF Window, and in that window I have a grid.

I use M-V-VM model and I want to add a TextBox to the grid dynamically in code(in viewmodel)

How can I

4条回答
  •  無奈伤痛
    2020-12-22 18:52

    You should move your creation code to View, and ViewModel should just notify view when it should be called.

提交回复
热议问题