• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
多莱特~梦未醒,再出发

行路难,行路难,多歧路,今安在。

长风破浪会有时,直挂云帆济沧海。

博客园    首页    新随笔       管理     

WPF 学习(1)

image

 

Two element trees exist within a WPF application: the logical tree and the visual tree.

logical tree

包含了element in xaml and 代码

textbox , and other :their composition and behavior within the programming model and the visual tree are quite different.

Visual Tree

For each element in the logical tree, additional elements may be created to represent visual aspects required by the element.

这一点和aspx相似,web control  render.

 

The visual system is the subsystem through which applications access the core presentation services available through WPF. This subsystem examines the components within an application (labels, buttons,text, 2D and 3D graphics, animations) and will communicate with the underlying composition system
(via the message transport) to generate the rendered result to the screen.

显示系统通过消息和底层交互。那么是不是可以通过重写消息机制,或者底层实现动态换肤或者还有更好的办法。这里肯定有啥可扩展的。

 

the font system interacts with two main subsystems—the element system and the visual system—each for a different purpose:
❑ The font system interacts with the element system’s Page and Table Service (PTS). PTS is
responsible for the organization and layout of text within the UI. This includes paragraphs,
tables, and blocks of text.
❑ The visual system leverages the font system for text layout services within a single line of text,
such as kerning, leading, and spacing.

Event Router

Property system

❑ Change notification
❑ Storage
❑ Expressions

change notification

wpf 使用 dependence property 来定义 属性变化。

properties are the main data element of WPF

expressions

<Window.Resources>
<Style TargetType=”{x:Type Button}”>
<Setter Property=”FontFamily” Value=”Segoe Black” />
<Setter Property=”FontSize” Value=”12pt” />
<Setter Property=”Foreground” Value=”#777777” />
<Setter Property=”HorizontalAlignment” Value=”Center” />
</Style>

表达式可以使用在wpf中任何地方。

Message Transport System

The message transport service is a key component of the WPF architecture that ties the visual system to  the composition system。

message transport system提供通道连接visual system 和 底层,其中实现了一种远程服务,用于数据的传输,可以对这里进行扩展,以支持类似于服务端,客户端表现的功能。

composition system 非托管代码负责处理与gpu以及软件的交互。

 

基本元素

1.xaml

2.appliation object 和 global相似。

Application myApp;
myApp = System.Windows.Application.Current;

posted @ 2010-04-27 11:25  Young跑跑  阅读(315)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3