我写的代码如下:
private void UserControl_Loaded(object sender, RoutedEventArgs e)
{
btnclose.Click += new RoutedEventHandler(btncloseshow);
}
private void btnMessageShow(object sender, RoutedEventArgs e)
{
MainWindow mw = new MainWindow();
Uri u = new Uri("hometypePage.xaml", UriKind.Relative);
mw.frame1.Source = u;
}
但不起作用,求帮助!!!!