Tuesday, 26 May 2009

Silverlight Rule 1

Discovered a Silverlight issue today in Visual Studio 2008.

When you add a user defined control to a control the parsing can stuff up. If the 1st control has event handlers that are not defined or parse incorrectly then you get into a state that is hard to recover from. I ended up with many AG_E_UNKNOWN_ERROR and AG_E_BAD_TYPE errors.

This leads to Silverlight rule no 1.

"Don't put event handlers into your Xaml."

Until the parser gets better, either VS2010, Silverlight 3 or a patch this seems to be the way.

No comments: