设置Wpf启动页面 [英] Setting Wpf Startup Page

查看:200
本文介绍了设置Wpf启动页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Wpf应用程序中将类设置为启动页面而不是xaml页面?





先谢谢

How can i set a class as Startup Page instead of a xaml page in Wpf Application???


Thanks in Advance

推荐答案



默认情况下,WPF应用程序执行从实现System.Windows命名空间的Application类成员的App类开始。 />
应用程序类具有StartupUri属性 - 您可以使用此属性。

此外,我将使用Startup事件。您可以将其添加到App.xaml并删除StartupUri行。添加它时,Visual Studio可以在App.xaml.cs文件中为您创建事件。
Hi,
By default in WPF Application execution starts in App class that implements Application class member of System.Windows namespace.
Application class has StartupUri property - you can use this one.
Also I would use the Startup event. You can add this to the App.xaml and remove the StartupUri line. When you add it, Visual Studio can create the event for you within the App.xaml.cs file.


这篇关于设置Wpf启动页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆