How to play Storyboard in ViewModel?

前端 未结 5 982
萌比男神i
萌比男神i 2021-01-15 12:04

I defiend a storyborad in View

  
            

        
5条回答
  •  轮回少年
    2021-01-15 12:19

    You could call the Storyboard from a code-behind as long as you assigned it x:Name. But then, you'd need to implement a button_click event handler, not a command for the ViewModel.

    If you're using MVVM then you should really abide by the principle that the ViewModel should not "know" about specifics of the View.

提交回复
热议问题