<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      享受代碼,享受人生

      SOA is an integration solution. SOA is message oriented first.
      The Key character of SOA is loosely coupled. SOA is enriched
      by creating composite apps.
        博客園  :: 首頁  :: 新隨筆  :: 聯系 :: 訂閱 訂閱  :: 管理

      Logical Tree & Visual Tree

      Posted on 2010-06-04 21:14  idior  閱讀(2669)  評論(1)    收藏  舉報

      The existing documentation about the visual tree and logical tree in the Windows SDK leaves much to be desired. Ever since I started with WPF, I have felt unsure about what exactly differentiates the two. Here I will use a simple diagram to make a comparison between them.

      <Window>

          <Grid>

              <Label Content="xuning"/>

              <Button>

                  <TextBlock Text="pfs"/>

              </Button>

          </Grid>

      </Window>

      Following is the logical and visual tree of the above xaml codes:

       

       

       

      There may be several questions come into your mind after seeing this picture:

      • Why those red elements are chosen to be part of logical tree? 

      The secret is behind a property called LogicalChildren. Panel, ItemsControl, ContentControl, and Decorator, which are the most common base classes, all define this property make the logical tree operate already.  For example, if you create a custom Button that subclasses ContentControl, your Content property will pick up your button as the logical parent without you doing anything.

      At the end of this article, a table lists the classes that have special support for logical children, and under which property they implement that support.

      •  Why there is a TextBlock under Label’s visual tree?

      Unlike the button, we didn’t declare a TextBlock as the Content of Label, instead we only used a string “Xuning” there. Who created a TextBlock for us? Apparently, it’s created by WPF framework. When WPF starts to render an object, it will first check whether there is a template defined for that type, either control template or data template, if it cannot find one, it will simply call the object’s ToString method and put the return value into a TextBlock.

      • Why Label’s logical child is a string?

      The element in logical tree doesn’t have to be a UIElement or Visual object, it can be any type. Label is a ContentControl which take its Content property as logical child, here it happens to be string “xuning”.

       

       

      Related Resources:

      Trees in WPF 

      Logical and Visual Tree 

      Of logical and visual trees in WPF

      Understanding the Visual Tree and Logical Tree in WPF

       

      Appendix:

      Class

      Property(ies)

       

      System.Windows.Controls


      AdornedElementPlaceholder

      Child property

      ContentControl

      Content

      Decorator

      Child

      Grid

      Children (inherited from Panel), Columns, Rows

      HeaderedContentControl

      Content (inherited from ContentControl), Header

      HeaderedItemsControl

      Items (inherited from ItemsControl), Header

      InkCanvas

      Children

      ItemsControl

      Items

      Page

      Content

      Panel

      Children

      RichTextBox

      Document

      TextBlock

      Text

      TextBox

      Text

      ToolBarTray

      ToolBars

      ViewBox

      Child

       

      System.Windows.Controls.Primitives


      BulletDecorator

      Bullet and Child

      DocumentViewerBase

      Document

      Popup

      Child

       

      System.Windows.Documents


      FixedDocument

      Pages

      FixedPage

      Children

      FlowDocument

      Blocks

      FlowDocumentReader

      Document

      FlowDocumentScrollViewer

      Document

      PageContent

      Child

      Table

      RowGroups, Columns

      Span

      Inlines

       

       

      主站蜘蛛池模板: 亚洲欧洲日产国产 最新| 免费无码一区无码东京热| 欧美精品亚洲精品日韩专| 日本熟妇XXXX潮喷视频| 国产自拍一区二区三区在线| www射我里面在线观看| 久久亚洲欧美日本精品| 色偷偷www.8888在线观看| 靖江市| 国产精品色三级在线观看| 国产成人综合欧美精品久久| 欧美激情一区二区三区成人| 成人亚洲国产精品一区不卡| 久久国产精品福利一区二区三区| 午夜福利yw在线观看2020| 日韩中文字幕av有码| 99久久亚洲综合精品成人网| 好男人社区在线www| 国产精品v片在线观看不卡| 平顶山市| 国产区成人精品视频| 国产精品中文第一字幕| 亚洲 制服 丝袜 无码| 丰满岳乱妇久久久| 四虎影视一区二区精品| 国产在线一区二区不卡| 男女xx00上下抽搐动态图| 蜜桃麻豆www久久囤产精品| 精品久久一线二线三线区| 午夜av高清在线观看| 阜城县| 亚洲国产av剧一区二区三区| 韩国午夜福利片在线观看| 在线成人国产天堂精品av| 久久99国内精品自在现线| 男女性高爱潮免费网站| 色悠悠成人综合在线视频| 国产精品自在自线视频| 亚洲av综合色区在线观看| 国产欧美日韩亚洲一区二区三区| 欧美亚洲另类自拍偷在线拍|