在C# WPF中,默认启动窗体是MainWindow.xmal
,如果要选择其他窗体,双击可以进入App.xaml
。
<Application x:Class="WpfApplication1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
将StartupUri
修改为对应窗体。如StartupUri="Window1.xaml"
。即可。
转载请注明出处
《C# WPF中修改默认启动窗体》https://www.ywlib.com/archives/47.html (from 一闻自习室)