Storyboard applied to a dashboard c# mvvm uwp

Javier R 211 Reputation points
2022-11-05T18:25:53.097+00:00

I have this code to open and close Panel with StoryBoard how I can implement it in the ViewModel. c# UWP

 public void OpenAndClose()  
        {  
            if(SlidePanel.Translate)  
            {  
                ShowPanel.Begin();  
            }  
  
            if(SlidePanel.TranslateX == 0)  
            {  
                HidePanel.Begin();  
            }  
        }  
Developer technologies | Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Nico 126 Reputation points
    2022-11-11T05:49:30.117+00:00

    Hi, Welcome to Microsoft QA

    The better way is that create a such IsOpen Dependency property for your side-panel, then binding it with a bool property where in the viewmodel, when you update this bool poperty, it will start different animation. For checking the samilar solution please refer to this case reply

    Thanks
    vzhumin


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.