如何在wpf appliation中将窗口窗体设置为启动窗体 [英] how to set window form as a startup form in wpf appliation
本文介绍了如何在wpf appliation中将窗口窗体设置为启动窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了wpf应用程序。如何在wpf应用程序中将启动表单设置为Sample.cs
解决方案
由于你的问题非常不精确,我的答案将是。
Windows窗体!= WPF窗口
通常,Visual Studio将Window1.cs设置为启动窗口。
(请参阅app.xaml在你的项目中,有一个属性StartupUri或类似的东西)
你不能设置启动表单sample.cs .cs是代码背后。
你设置sample.xaml
打开你的App.xaml并设置启动Uri Sample.xaml
< pre lang = HTML>< application x : class = MyApp.App xmlns:x = #unknown >
xmlns = http://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:x = http://schemas.microsoft.com/winfx/2006/xaml
StartupUri = Sample.xaml >
< application.resources>
< / application.resources >
< / application > 跨度>
i have created wpf application . how to set the startup form as Sample.cs in wpf application
解决方案
As your question is very inprecise, my answer will be to.
Windows Form != WPF Window
Generally, Visual Studio sets "Window1.cs" as startup window.
(See app.xaml in your project, there is a property "StartupUri" or something like this)
You can't set startup form sample.cs .cs is code behind.
You set sample.xaml
Open your App.xaml and set Startup Uri Sample.xaml
<pre lang="HTML"><application x:class="MyApp.App" xmlns:x="#unknown"> xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="Sample.xaml"> <application.resources> </application.resources> </application>
这篇关于如何在wpf appliation中将窗口窗体设置为启动窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文