You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.0 KiB

2 years ago
using PageSample.SubPage;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace PageSample
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private Page1 _p1;
private Page2 _p2;
public MainWindow()
{
InitializeComponent();
_p1 = new Page1();
_p2 = new Page2();
}
private void btnPage1_Click(object sender, RoutedEventArgs e)
{
frmMain.Content = _p1;
}
private void btnPage2_Click(object sender, RoutedEventArgs e)
{
frmMain.Content = _p2;
}
}
}