您的位置:首页 > 其它

WPF学习笔记一

2009-02-19 09:46 253 查看
  WPF(Windows Presentation Foundation)是新一代的Windows应用开发框架,如果您是像我一样从0开始学习Windows应用程序的开发,WPF是不错的选择,更多关于WPF的介绍敬请疯狂的Google吧,以下是我的WPF学习笔记(Pro WPF in C# 2008、Matthew ),快乐分享。该笔记持续更新。

自划重点:

lEvery element in a XAML document maps to an instance of a .NET class. The name of the element matches the name of the class exactly.
在XAML文档中每一个元素对应一个.NET类的实例。元素的标识符和所对应类的标识符完全相同。

Three top-level elements of WPF application-windows, page and application.
WPF应用程序的最顶层元素有三种,分别是Windows、Page和Application。

The InitializeComponent() method plays a key role in WPF applications. For that reason, you should never delete the initializeComponent() call in your window’s constructor. Similarly, if you add another constructor, make sure it also calls InitializeComponent().
InitializeComponent()方法在WPF应用程序中扮演着重要的角色。因此,在Window的构造函数中不要删除InitializeComponent()方法。类似的,如果添加其他的构造函数,保证标识符同样为InitializeComponent。

注:”自划重点”部分笔者自行翻译,由于能力有限仅供参考,欢迎批评指正。

自我总结:

WPF的一大特色是设计与编码分离,这也是微软开发XAML的重大原因之一,通过这种分离的设计模式,开发人员可以将完成的程式交给设计人员,而设计人员可以很方便的通过操作XAML的工具(如Expression Blend)设计、调整和优化软件的布局与内容。

WPF的图形接口使用DirectX而非传统WinForms使用的GDI/GDI+,这将会提供更好的硬件加速,并且使用托管的C#组件方便快捷的开发WPF应用。

所遇生词:

intrinsic connection

translate painstakingly into your application

collaboration

to facilitate this design

encompasses the elements that describe WPF content

makes it faster to parse at runtime

convention dictates that all the namespaces you need

inadvertently create different XML-based languages with the same name

will be merged into the automatically generated portion

written by Kim 2/19/2009
查看更多原创技术文章/项目源码/视频教程
欢迎访问 http://www.bosnma.com
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: