WPF启动问题 [英] WPF start up problem

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

问题描述

感谢所有人,我主要想执行以下步骤:
1.我创建了一个Wpf项目.
2.在我的项目中创建三个文件夹(UI,DAO,DLL)
3. App.xaml + .cs和window.xaml + cs都放在UI文件夹中.
4.更改名称空间.UI
5.但是当我要调试时,错误消息显示错误:名称"InitializeComponent"在当前上下文中不存在".
6.我无法运行window.xaml.

这就是问题.请帮助我.

thanks to all, I mainly want do the following steps:
1. i have created a Wpf project.
2. Making three folder in my project (UI, DAO, DLL)
3. App.xaml+.cs and window.xaml+cs both were putted in UI folder.
4. Change the namespace.UI
5. but when i want to debug error message shows "Error: The name ''InitializeComponent'' does not exist in the current context".
6. i can''t run window.xaml.

THIS WAS THE PROBLEM. plz help me.

推荐答案

创建WPF项目时,VS将创建App.Xaml + .cs.我猜你做错了什么.

尝试将新的WPF项目添加到您的解决方案中,看看是否存在App.Xaml.如果是这样,则可以将冷杉WPF项目中的文件复制到其中,然后删除旧的文件.
When you create a WPF project the App.Xaml + .cs are created by VS. I''m guessing you did something wrong.

Try adding a new WPF project to your solution and see if the App.Xaml is there. If so, you could copy files from your firs WPF project into it and delete the old one.


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

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