Skip Navigation LinksHome / Articles / View Article

Consistent Annoyance from Silverlight 2

+ Add to SilverlightShow Favorites
0 comments   /   aggregated from Non-Destructive Me on Apr 30, 2008  /  original article
(0 votes)
Categories: Issues

"Found" an annoying little bug that I can't seem to get around while moving some Silverlight 1.1 code to Silverlight 2.0.

In this project, all of our controls have a base class that provides some common functionality.  In Silverlight 2.0, now that we have proper user controls and that wonderful InitializeComponent() method, I've been moving all our old style user controls to the proper method.

However, Silverlight generates a partial class where the InitializeComponentMethod() sits, and this class is regenerated every time you change some of the XAML.  Now the bug comes in here.  When the class is regenerated, the base class you've chosen in your partial class is not the one that Silverlight uses in the generated code.  It always sets it back to UserControl.

In our project, with around 50 controls, on an initial checkout, the developer has to go to 50 controls and change the generated code and on every XAML change, fix it too.  I really do hope this is fixed in the next Silverlight release.



Comments RSS RSS
No comments

Add Comment


Please add 3 and 2 and type the answer here:

Help us make SilverlightShow even better and win a free t-shirt. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need a material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)