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?
Imran Javed ZiaConnect With a Mentor Consultant 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.

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

tonelm54Author Commented:
ok, thank you. I will have a play over the bank holidays.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.