麻烦在VS 2010中一个控制台应用程序转换为WPF应用程序 [英] Trouble converting a console application to a WPF application in VS 2010

查看:166
本文介绍了麻烦在VS 2010中一个控制台应用程序转换为WPF应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造,我后来决定将更好地发挥作用作为一个WPF应用程序控制台应用程序。我改变了输出类型的Windows应用程序,并添加了我认为是必要的参考。不幸的是,在项目上右击不允许我添加一个资源词典或许多其他WPF类型。什么我错过了?

I created a console application that I later decided would function better as a WPF application. I changed the output type to Windows Application and added what I believe are the necessary references. Unfortunately, right-clicking on the project does not allow me to add a Resource Dictionary or many other WPF types. What have I missed?

推荐答案

最简单的方法是创建一个新的WPF应用程序和移动code。最好的方法是将逻辑推入企业库中,所以你可以很容易地使用一个控制台应用程序和一个WPF应用为presentation技术,业务逻辑,因为WPF是一个用户界面技术,而不是应用程序类型。

The easiest method would be to create a new WPF application and move the code. The best method would be to push the logic into a business library so you can easily use a console application and a wpf application as the presentation technology for the business logic, because WPF is a user interface technology, not an application type.

这是一个怪胎的角度来看,如果你想解决学习困难的方式,我会创建一个单独的WPF applicationn并检查该凸出文件。很可能是在那里的一些点点,使事情的工作为WPF,以及一些丢失的引用。

From a geek standpoint, if you want to solve the hard way to learn, I would create a separate WPF applicationn and examine the proj file. Most likely there is some little bit in there that makes things work as WPF, as well as some missing references.

这篇关于麻烦在VS 2010中一个控制台应用程序转换为WPF应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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