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