So here is the script. I have 3 xaml :
In MainWindow, I have a button named "Page1" and a frame named "Frame1"
code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1. Dim page1 As New Page1 Frame1.Navigate(page1) End Sub
Thus, it will display Page1.xaml in "Frame1"
Then under Page1.xaml I have another button named " Page1.xaml "
code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click Dim p2 As New page2 Dim main As New MainWindow main.Frame1.Navigate(p2) End Sub
The frame will not cause any changes when the button is pressed inside "Page1", which is located inside "Frame1" and inside "MainWindow"
I think something is missing ...
user2054170
source share