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.

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 8 and 6 and type the answer here:

Join the free SilverlightShow webcast 'Running Silverlight Outside the Browser and with Elevated Trust'. Sept 7th, 8 am - 9 am PDT.
In this live session Chris Anderson will cover configuring and debugging OOB mode, toast notifications, elevated trust, direct file access and much more.
Learn more | Register | See more webinars (hide this)