How would I go about switching the main display XAML page that gets used in an XBAP. The only different is I want a larger mode and a smaller mode, but with the same controls (some hidden).
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your App.xaml.cs file, you can programmatically change which Window.xaml file you want to show on startup. Here is an over-simplified example.
You can also do this by changing the StartupUri in your App.xaml file but that is obviously going to be harder to change at runtime.
I’ve haven’t tried binding to a property in the application declaration in the XAML, but VS 2010 doesn’t complain about this. My concern would be that the app had it’s datacontext set early enough for this to work correctly. Give it a try and let us know how it works. 🙂