Reputation: 1448
I have initParams
tag, which specify which child window to load in a navigation based Silverlight application. I set it in web project. Consume it in App.xaml.cs
inside Application_Startup
event.
But, i need to pass this to MainPage.xaml.cs
, so that i could load the appropriate child window. How do it set it with this.RootVisual?
Upvotes: 1
Views: 726
Reputation: 189505
The content of InitParams
is also available statically as:-
Application.Current.Host.InitParams
However why would you want to pass this to MainPage
only to have it replace the RootVisual
? It would be better for the code in App.xaml.cs to determine which page should be the RootVisual
and assign it once.
Upvotes: 3