WPF的优点和缺点 [英] Advantages and Disadvantages of WPF

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

问题描述

WPF的优点和缺点是什么?

What are advantages and disadvantages of WPF?

推荐答案

之前曾提出类似的问题。请参阅此处回答 [ ^ ]。
A similar question was asked before. See the answer here[^].


WPF是微软退出Windows的一个伟大举措!这并不是秘密,微软正在新的非Windows OP基础上工作,纯粹基于位于HAL之上的CLI。你看一下WPF架构,你会发现它几乎与Windows无关:没有传统控件,没有Windows消息。它基于硬件支持(这意味着更好的性能),可以在相对较短的时间内移出Windows操作系统。



如果有更高级别的工具,与表格相比。例如,通常没有基于WM_PAIN消息的渲染或类似的东西。您可以创建对象并将它们放在画布上。 3D,动画,数据绑定有不同的层次,包括真正的高水平。非常自然且功能丰富的矢量图形支持。我正在使用InkScape与SVG一起使用,将其导出到XAML并在设计时或运行时使用。缩放,平移,透明,各种图形转换已在库中完成。

WPF库的总体积非常令人印象深刻。表格看起来很悲惨。



图书馆在功能和质量方面更加现代化。一切都是消除锯齿,没有闪烁......



问题:



支持设计时,与Designer同步以及在设计时验证项目有点笨拙但正在改进。由于设计时间是一个单独的问题,因此很可能采用替代开发技术。



还没有对Mono上的WPF提供支持。我可以在我的Linux系统上运行我的Forms应用程序而无需重新编译,但我不知道何时可以使用WPF来实现它。



一些非常重要的组件不是尚未开发或尚未完整的功能集。例如,PropertyGrid的模拟在哪里?一切都可以开发,生产效率更高。



-SA
WPF is a great move of Microsoft out of Windows! It's not a secret, that Microsoft is working at the new non-Windows OP bases purely on CLI sitting right on top of HAL. It you look at WPF architecture, you will see it has almost nothing to do with Windows: no legacy controls, no Windows messages. It's based on hardware support (which means better performance) and can be moved out of Windows OS in a relatively short period of time.

If has mush higher-level tools, compared to Forms. For example, normally there is no rendering based on WM_PAIN message or anything like that. You create objects and put them on canvas. 3D, animation, data binding have different levels, including really high level. Very natural and feature-rich support of vector graphics. I'm using InkScape working with SVG, export it to XAML and use during design-time or run-time. Scaling, panning, transparency, all kinds of graphical transformation is already done in the library.
The total volume of WPF library is very impressive. Forms looks just miserable.

The library is much more modern in terms of features and quality. Everything is anti-aliased, nothing is flickering…

Problems:

Support of design-time, synchronization with Designer and validation of the project during design-time is a bit clumsy but is being improved. As design-time is a separate issue, alternative development techniques are quite possible though.

There is not support on WPF on Mono yet. I can run my Forms application on my Linux system without recompilation, but I don't know when I can get to it with WPF.

Some very important components are not yet developed or does not have comprehensive feature set yet. Where is the analog of PropertyGrid, for example? Everything can be developed though, with better productivity.

—SA


WPF应用程序的优势:



1>紧密的多媒体集成:

----------------------------------

在Windows 32或Windows窗体应用程序中使用3-D图形,视频,语音和丰富文档查看,您需要学习几种独立技术并将它们混合在一起,而无需太多内置支持。 WPF应用程序允许您使用一致的编程模型来使用所有这些功能。



2>分辨率独立性:

-----------------------------

WPF允许缩小或放大屏幕上的元素,与屏幕的分辨率无关。它使用矢量图形使您的应用程序与分辨率无关。



3>硬件加速:

---------------------------

WPF是建立在Direct3D的顶部,它将工作卸载到图形处理单元(GPU)而不是中央处理器单元(CPU)。这为WPF应用程序提供了硬件加速的优势,允许更平滑的图形和增强的性能。



4>声明性编程:

-----------------------------

WPF使用可扩展应用程序标记语言(XAML)声明性编程,用于定义应用程序对象的布局并表示3-D模型等。这使得图形设计师可以直接为WPF应用程序的外观做出贡献。



5>丰富的构图和定制:

------------------------------------- -

WPF控件很容易定制。您无需编写任何代码来以非常独特的方式自定义控件。 WPF还允许您为具有完全不同外观的应用程序创建外观。



6>易于部署:

---------------------

WPF提供部署传统Windows应用程序的选项(使用Windows Installer或ClickOnce)。此功能并非WPF独有,但仍是该技术的重要组成部分。



7>文化意识控制:

-----------------------------

静态控件中的文本和String函数的返回数据将根据最终用户操作系统指定的文化和语言进行修改。
Advantage of WPF Application:

1> Tight multimedia integration :
----------------------------------
to use 3-D graphics, video, speech, and rich document viewing in Windows 32 or Windows Forms applications, you would need to learn several independent technologies and blend them together without much built-in support. WPF applications allow you to use all these features with a consistent programming model.

2> Resolution independence :
-----------------------------
WPF lets you shrink or enlarge elements on the screen, independent of the screen’s resolution. It uses vector graphics to make your applications resolution-independent.

3> Hardware acceleration :
---------------------------
WPF is built on top of Direct3D, which offloads work to graphics processing units (GPUs) instead of central processor units (CPUs). This provides WPF applications with the benefit of hardware acceleration, permitting smoother graphics and enhanced performance.

4> Declarative programming :
-----------------------------
WPF uses Extensible Application Markup Language (XAML) declarative programming to define the layout of application objects and to represent 3-D models, among other things. This allows graphic designers to directly contribute to the look and feel of WPF applications.

5> Rich composition and customization :
---------------------------------------
WPF controls are easily customizable. You need not write any code to customize controls in very unique ways. WPF also lets you create skins for applications that have radically different looks.

6> Easy deployment :
---------------------
WPF provides options for deploying traditional Windows applications (using Windows Installer or ClickOnce) . This feature is not unique to WPF, but is still an important component of the technology.

7> Culturally aware controls:
-----------------------------
static text in controls and the return data for the String function are modified according to the culture and language specified by the end user's operating system.


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

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