Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Consecutive navigate to the same page, WPF Browser in a frame

$
0
0

Hi,

I can’t navigate second time to the same page!

The first Navigate it is OK! For example „catode“  to "Views/Page2.xaml" 

        

The second  mMenu_Click  “anode”  also to  "Views/Page2.xaml" doesen’t  rich the Loaded

this.Loaded +=newRoutedEventHandler(CancelNavigationPage_Loaded);

but is landing in :

void NavigationService_Navigating(object sender, NavigatingCancelEventArgs e)

{

}

Page1.xaml

 <Frame Grid.Row="2" Grid.Column="1" Name="frame1"/>

Page1.xaml.cs

privatevoid mMenu_Click(object sender,RoutedEventArgs e)

       {

          

           MenuItem mnu = (MenuItem)e.OriginalSource;

 

           GesLib.gloVar.Set_tableName(mnu.Name.TrimEnd());

           switch (mnu.Name)

           {

               case"anode":

                 frame1.NavigationService.Navigate(new System.Uri("Views/Page2.xaml",          UriKind.Relative));

                   break;

               case"catode":

                 frame1.NavigationService.Navigate(new System.Uri("Views/Page2.xaml",          UriKind.Relative));

                   break;

           }

       }

 


Viewing all articles
Browse latest Browse all 18858

Trending Articles