第一步:在app.xaml.cs里加入以下代码:
[STAThread] public static void Main(string[] args) { App app = new App(); app.InitializeComponent(); app.Run(); }
第二步:右键App.xaml文件在属性窗口中将“建置動作”(繁體)ApplicationDefinition改为Page。
第三步:右键项目名称,选择属性,在属性页面中点击应用程序,将啓始物件(繁体)(默认未设置)切换为App。
第四步:保存,重新编译。
註:轉載請說明出處。
http://www.cnblogs.com/RedSky/p/5776625.html
时间: 2024-12-21 10:18:30