I have a frame and there is page with 2 buttons in that frame. I want to open another page in that same frame when click a button on previous page. I know how to open the page when initializing the frame.
public partial class PnlTabs_SM : Window
{
public PnlTabs_SM()
{
InitializeComponent();
frame_SM.NavigationService.Navigate(new Uri("SubPnlWelcomeTabs.xaml", UriKind.Relative));
}
}
Here you can find the Page Code:
public partial class SubPnlWelcomeTabs : Page
{
public SubPnlWelcomeTabs()
{
InitializeComponent();
}
private void btnPurchaseRequistions_Click(object sender, RoutedEventArgs e)
{
}
}
the page which I want to open:
public partial class SubPnlPRTabs : Page
{
public SubPnlPRTabs()
{
InitializeComponent();
}
}
XAML Frame Code:
<Frame x:Name="frame_SM"
x:FieldModifier="public"
NavigationUIVisibility="Hidden"
Width="950"
Height="460"/>
I want to display the SubPnlPRTabs page in the same frame called "frame_SM" when click btnPurchaseRequistions
Kind consideration is highly appriciated. Thank you!