Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Skinnable Controls with generic.xaml
6 replies. Latest Post by pkr2000 on August 31, 2009.
(0)
decius
Member
26 points
66 Posts
08-20-2009 4:56 PM |
The following video incorporates the technique of implementing a Themes/generic.xaml to provide a default ControlTemplate for an extended Control.
http://silverlight.net/learn/learnvideo.aspx?video=116200&CommentPosted=true#commentmessage
After watching this video and trying to incorporate the technique, I find that due to the poor XamlParsing exception handling provided by VS2008 makes this an unstable approach to developing skinned controls. This is because, if one typo or one line of bad syntax sneaks into generic.xaml, you get a worthless line number exception and aren't given any sort of clue whatsoever as to where the xaml error might exist.
I was hoping to know what everyone else thought and if there were any other "preferred" ways to skin a control. What's the rest of the community doing? And has anyone else experienced the same frustrations?
isanam
85 points
30 Posts
08-21-2009 2:25 AM |
I completely agree with you.
Working on skinning using XAML is like walking though a dark room. And if you fall down you won't get any clue why it happened .
Probably we need some one to tell us if we can use some better tools/ methods of skinning.
08-21-2009 8:19 AM |
The general concensus I've heard is to "use expression blend". However, call me old fashioned or stubborn, but I would prefer to write most things by hand and only use the designer for tasks deemed appropriate. It seems that MS is not backing that sentiment as much as the WYSIWYG philosophy. I'm hoping that VS2010 will prove me wrong there, but so far it's not promising. Anyone know if VS2010 will improve this?
Jac_P
Participant
1044 points
189 Posts
08-21-2009 9:29 AM |
Blend is completely designed for web designers and not for pro coders.
For skinning what we have done is - take a sample standard theme, say, office_black, and edit it. I assure you it is not an easy task. :-).
pkr2000
1219 points
377 Posts
08-22-2009 3:45 AM |
Donning flame-proof devils advocate jacket, is it such a bad idea to require the use of a tool to design styles? I have some sympathy in MS starting from the ideal situation of designer+developer=SL application as usually they start by pampering the bedroom developer and wonder why there are so many bad applications out there. Having said that I do agree that VS support is currently poor and TBH I'm not sure Blend does a great job either.
08-31-2009 10:56 AM |
Sure, I agree MS has done a bad job at that in the past. Having a WYSIWYG is never a bad thing. However, support for core development components should come BEFORE that.
I think it to be a very backwards thing for someone to say, "let's construct the key components of the command line interface AFTER making this pretty GUI"
08-31-2009 11:12 AM |
I don't think is as much about having a WYSWYG editor as it is a separation of roles. There is just enough in VS to create the basic structure of what you want but no help in creating the layout of that structure. In Blend 2 it was lots of help in creating the layout and almost zero in making it work without a developer. Blend 3 has lots more in it to let a designer get on with things without a developer, but in VS we have to wait for VS2010. But all the time it is trying to renforce the values of a separate designer and a developer roles. If you wear both hats (and are actually good at both) then currently yes you have to switch between both applications. I think it's a worthy idea but does it actually work, I'm not sure. IMO they haven't abondended any core compoments in that...just made you buy extra software...