Swithing between pages

Good evening,
Im learning Silverlight at the moment, and Ive got issues with switching between pages.

In the startup of Silverlight there is the following code:-
    Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup
        Me.RootVisual = New MainPage()
    End Sub

Open in new window

Is it possible that in the MainPage, i can run something like:-
          Application.RootVisual = New SecondPage()

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I would use NavigationService.Navigate to switch pages:
see this ressource for a broad overview in navigation for silverlight:

in short:
NavigationService.Navigate(new Uri("MyPage.xaml", UriKind.Relative))

Open in new window

Imran Javed ZiaConsultant Software Engineer - .NET ArchitectCommented:

in simple application where you don't have Navigation Frame you can simply use

Me.Content = New MyPage()

for Frame approch you have to use some other way,
Please let me know you application and navigation structure.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tonelm54Author Commented:
ok, thank you. I will have a play over the bank holidays.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.