zoukankan      html  css  js  c++  java
  • Silverlight 的控件生命周期

    微软的 Dave Relyea 在 blog 中解释了 Silverlight 中控件的生命周期,以及一些可以 override 的基类方法发生的时机。

    http://blogs.msdn.com/devdave/archive/2008/10/11/control-lifecycle.aspx

    Action Control instantiated in XAML Control instantiated in code
    Control ctor As soon as begin tag is parsed. When you call it.
    Explicit Style applied If the Style property is set in XAML, it will be applied as soon as the end tag is parsed. As soon as Style property is set.
    Built-in Style (from generic.xaml) applied As soon as the end tag is parsed, after the explicit Style (if any) has been applied. Will not override explicit Style. When the control enters the tree. Will not override explicit Style.
    Properties set When the attributes are parsed. When you set them.
    Loaded event Posted when the element is been added to the tree. Fired before the next frame. Happens before layout. Same.
    Template applied (i.e. control's visual are created from the Template) In the Measure pass of layout. The Template property will be applied if the control has no visual tree. The control starts life with no visual tree, and the visual tree will be cleared when the Template property is set. You can also call ApplyTemplate yourself. Same.
    OnApplyTemplate called Whenever the Template is applied. It is not necessary to call the base OnApplyTemplate for the Template to be applied, but inherited types might be relying on it for their implementations. Same.
    Visuals first available In OnApplyTemplate. Use GetTemplateChild. Same.
    MeasureOverride called In the Measure pass of layout. If the Template was expanded during this Measure pass, MeasureOverride will be called after the Template has been expanded. Same.
    ArrangeOverride called In the Arrange pass of layout, which occurs after the Measure pass. Same.
    SizeChanged event After the Measure and Arrange passes have completed. Same.
    LayoutUpdated event After SizeChanged events have fired. Same.

  • 相关阅读:
    pytorch+tensorboard 安装
    pytorch安装
    255.用队列实现堆栈
    23. 合并K个升序链表(学习了java的自定义比较类)
    21.合并两个有序链表
    138.复制带随机指针的链表
    10个教师必备的资源网站,想要免费地过来看看
    班主任如何管理一个乱班、差班?
    高阶函数_函数柯里化 以及 setState中动态key
    React中的PropTypes详解
  • 原文地址:https://www.cnblogs.com/RChen/p/1309305.html
Copyright © 2011-2022 走看看