2000条你应知的WPF小姿势 基础篇<69-73 WPF Freeze机制和Template>

来源:互联网 发布:金十数据原油点评 编辑:程序博客网 时间:2024/06/06 21:39

  在正文开始之前需要介绍一个人:Sean Sexton. 来自明尼苏达双城的软件工程师。最为出色的是他维护了两个博客:2,000Things You Should Know About C# 和 2,000 Things You Should Know About WPF 。他以类似微博式的150字简短语言来每天更新一条WPF和C#重要又容易被遗忘的知识。很希望能够分享给大家。

  本系列我不仅会翻译他的每一个tip,也会加入自己开发之中的看法和见解。本系列我希望自己也能和他一样坚持下来,每天的进步才能促成伟大。

  在这里郑重说明.该系列是基于Sean Sexton先生的英文博客, Sean Sexton拥有全部版权和撤销权利。

  前文可以翻阅本博客wpf标签的文章。

  [小九的学堂,致力于以平凡的语言描述不平凡的技术。如要转载,请注明来源:小九的学堂。cnblogs.com/xfuture]

  #69 wpf基础类提供的功能单元

  四个基础的WPF类直接或间接继承自DependencyObject, 提供了超出其基础类的不同功能:

  ContentElement adds (继承自 DependencyObject)

  Input events and commanding

  Focus

  Raise and respond to routed events

  Animation support

  FrameworkContentElement adds (继承自 ContentElement)

  Additional input elements (e.g. tooltips, context menus)

  Storyboards

  Data binding

  Styles

  Property value inheritance

  UIElement adds (继承自 DependencyObject)

  via Visual

  Hit testing

  Clipping and coordinate transformations

  Participation in visual tree via parent/child relationships

  Layout behavior (measure/arrange)

  Input events and commanding

  Focus

  Raise and respond to routed Events

  Animation support

  FrameworkElement adds (继承自 UIElement)

  Additional input elements (e.g. tooltips, context menus)

  Storyboards

  Data binding

  Styles

  Property value inheritance

  Support for the logical tree

0 0
原创粉丝点击