Control Lifecycle

What happens when you create a Control? When do overrides get called and events get raised? When do styles get applied? In response to this thread on silverlight.net, I’ve whipped this simple table up. There are some subtle differences between instantiating a control in XAML, and instantiating it via code that I’ve called out, but…

12

Layout Events - SizeChanged and LayoutUpdated

Executive Summary: Most of the time, SizeChanged is the right event to use, and LayoutUpdated is the wrong event.  The Silverlight 2 layout system offers two events: SizeChanged and LayoutUpdated. They look the same…here is how they are hooked up in C#: public Page() {     InitializeComponent();       LayoutRoot.SizeChanged += LayoutRoot_SizeChanged;     LayoutRoot.LayoutUpdated += LayoutRoot_LayoutUpdated;…

2