Hi Guys,
Here are the code snippets to load a page (pls see below).
I am wondering how to unload the page.
Thanks,
Richard.
Here is .xaml
<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="300" Width="300"><StackPanel><Frame Name="frame"/><Button Height="30" Click="Button_Click">BtnGoToPage01</Button></StackPanel></Window>
Here is .cs
private void BtnGoToPage01_Click(object sender, System.Windows.RoutedEventArgs e) { NavigationService NS = frame.NavigationService; NS.Navigate(new Uri("Page1.xaml", UriKind.Relative)); }