вторник, 9 марта 2010 г.

What I really hate about Silverlight

Silverlight is feature incomplete, but I can live with what’s available. Some features are incompatible with WPF counterparts, but I can workaround incompatibilities. What I really hate about Silverlight is the way it reports runtime errors.

Example. Debugging custom templated control I got the following message:

Error: Unhandled Error in Silverlight Application
Code: 2012   
Category: ParserError      
Message: Unknown attribute Text on element TextBlock.    
File:     
Line: 2    
Position: 41

The message is confusing to say the least (unless I miss something, Text attribute is perfectly valid on a TextBlock element). And I had to use trial and error method just to find out silly mistake: there was a TemplateBinding to CLR-property in a control template. I should have declared that property as DependencyProperty. What a waste of time :(

Комментариев нет:

Отправить комментарий

Random thoughts, ideas and questions on .NET development

Постоянные читатели