silverlight   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Silverlight 的控件生命周期大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

微软的 Dave Relyea 在 blog 中解释了 Silverlight 中控件的生命周期,以及一些可以 override 的基类方法发生的时机。 http://blogs.msdn.com/devdave/archive/2008/10/11/control-lifecycle.aspx   Action Control instantiated in XAML Control insta
@H_301_1@

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

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

 

@H_505_58@measureOverride called
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 @H_834_29@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 callApplyTemplate 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.
In the @H_834_29@measure pass of layout. If the Template was expanded during this @H_834_29@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@H_834_29@measure pass. Same.
SizeChanged event After the @H_834_29@measure and Arrange passes have completed. Same.
Layoutupdated event After SizeChanged events have fired. Same.

大佬总结

以上是大佬教程为你收集整理的Silverlight 的控件生命周期全部内容,希望文章能够帮你解决Silverlight 的控件生命周期所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。