How to play Storyboard in ViewModel?

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

I defiend a storyborad in View

  
            

        
5条回答
  •  遥遥无期
    2021-01-15 12:29

    Please don't trigger the storyboard from the viewmodel. If you do then there is no point having a viewmodel.

    Implement any code for the relay command in the code behind of the view, then if needed you can call through to the viewmodel to do anything that is viewmodel specific. When you reference the storyboard from the code behind of the view you can just refer to it by name.

提交回复
热议问题