C#桌面应用 [英] C# Desktop Apps

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

问题描述

在C#方面放松了一两年之后,我决定再看看.以前,我在网络上使用C#,但现在我正在研究创建桌面应用程序.而且我想使用一种最新技术(以免我不得不在一年的时间里学习另一种技术……).我也特别想针对Windows 7-但也能够为XP创建一些应用程序.我的问题是:

您认为哪种技术最适合用来创建我的桌面应用程序,为什么? Windows Presentation Foundation? Windows表单?其他?我真的没有头绪,所以我希望朝着正确的方向前进! :)

干杯.[竖起大拇指]

After slacking on the C# front for a year or two, I''ve decided to have another look. Previously I used C# for the web, but now I''m looking into creating desktop apps. And I''d like to use one of the latest technologies (to save me having to learn another one in a year''s time...). I''d also particularly like to target Windows 7 - but also be able to make some apps for XP. My question is:

Which technology do you think is best to use for creating my desktop apps and why? Windows Presentation Foundation? Windows Forms? Other? I really don''t have a clue, so I''m hoping for a nudge in the right direction! :)

Cheers.[thumbs up]

推荐答案

我要对你说一件事. WPF是下一代.

There is one thing i will say to you. WPF is the Next Generation.


Marc Firth写道:
Marc Firth wrote:

您认为哪种技术最适合使用用于创建我的桌面应用程序,为什么? Windows Presentation Foundation? Windows表单?其他?

Which technology do you think is best to use for creating my desktop apps and why? Windows Presentation Foundation? Windows Forms? Other?



这是一个棘手的问题,而不是一个容易回答的问题.首先,让我们解决一个误解-WinForms不会很快消失,因此学习它们不会浪费任何精力.在很长一段时间内,您仍然可以在其中开发桌面应用程序.

现在,我说,出于多种原因,我选择WPF而不是WinForms.

1.虽然WinForms不会消失,但MS不会积极地对其进行改进,因此您将无法获得所得到的帮助.
2. WPF使创建数据绑定的应用程序变得更加容易.不必写很多string myValue = txtName.Text;txtName.Text = dr[dr.GetOrdinal("MyValue")].ToString(); 代码,您可以在WPF中使用两种方式进行数据绑定以达到良好的效果.
3.更改WPF应用程序的外观很容易.
4.如果要迁移到Silverlight,它基于WPF,因此过渡要容易得多.
5. Microsoft积极致力于改进WPF,并开始在自己的应用程序中使用它.
6. WPF底层的基础架构功能强大得多.



That''s a tricky question, and not one that''s easy to answer. First of all, let''s address a misconception - WinForms aren''t going to go away anytime soon, so learning them isn''t going to be wasted effort. You''ll still be able to develop desktop applications in them for a long time to come.

Now, saying that, I''d choose WPF over WinForms for a number of reasons.

1. While WinForms isn''t going away, it''s not going to be actively improved by MS, so you''re stuck with what you get.
2. WPF makes it easier to create data bound applications. Rather than having to write lots of string myValue = txtName.Text; and txtName.Text = dr[dr.GetOrdinal("MyValue")].ToString(); code, you can use two way databinding in WPF to good effect.
3. It''s easy to change the look and feel of WPF applications.
4. If you want to move over to Silverlight, it''s based on WPF so the transition is a lot easier.
5. Microsoft is actively targetting improving WPF, and is starting to use it in its own applications.
6. The infrastructure underlying WPF is a whole lot more powerful.


好吧,我会使用winforms,因为
1)拖动''n拖放编辑器不会吸引
2)现有代码会更好地适应它,因为每个人都习惯了.
3)文本呈现并不模糊并且不容易引起头痛.
4)您不是在写广告,为什么它看起来必须浮华?
Well, I''d do winforms, because
1) the drag ''n drop editor does not suck
2) existing code will fit it better because everyone is used to it
3) text rendering is not blurry and headache-inducing
4) you''re not writing an advert so why does it have to look flashy?






这篇关于C#桌面应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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