Suspend Databinding of Controls

前端 未结 6 1359
终归单人心
终归单人心 2021-02-05 13:00

I have a series of controls that are databound to values that change every second or so. From time to time, I need to \"pause\" the controls, so that they do not update their d

6条回答
  •  猫巷女王i
    2021-02-05 13:07

    If you keep a reference to the view in the controller class you could fire an event from the view model when you want to suspend databinsing that has the controller clear the DataContext of the view. and when you are ready to start sending an receiving data again, reset the Views DataContext to the View Model.

提交回复
热议问题