WPF-在App.xaml直接启动Page

由于直接启动没办法设置page的高和宽所以只能通过代码写入。

只能再app.xaml中删掉它

 

 然后再app.xaml中写上。

private void Application_Startup(object sender, StartupEventArgs e)
{

  NavigationWindow window = new NavigationWindow();
            window.Source = new Uri("Pages/Check/DataSync.xaml", UriKind.Relative);
            window.Height = 800;
            window.Width = 800;
            window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            window.Show();
}

 

posted @ 2019-09-05 09:43  ZaraNet  阅读(693)  评论(0)    收藏  举报