I basically need a section of the screen to have an “authentication” box where, if you’re logged in then it displays your user name and a “switch user” button, but if you’re not logged in, it just displays a login button.
I could have two completely different controls, put them both on the screen and bind their visibility property to IsAuthenticated, but I was hoping there were some good suggestions out there for a better way.
Thanks
Since you mention binding the visibility I’ll show what I did to solve a similar problem.
In your App.xaml put
For every control you wish to control the visibility via a boolean property in your view model you can simply do this.
This will toggle the visibility of the control based on
IsEditable.