App.xaml中设置: StartupUril="windowname"
<Application x:Class="Code.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="frmLogin.xaml" ShutdownMode="OnLastWindowClose">
<Application.Resources>
</Application.Resources>
</Application>