Skip to main content

Microsoft Silverlight

Answered Question Skinnable Controls with generic.xamlRSS Feed

(0)

decius
decius

Member

Member

26 points

66 Posts

Skinnable Controls with generic.xaml

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
isanam

Member

Member

85 points

30 Posts

Re: Skinnable Controls with generic.xaml

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.

Cipher Isanam
-------------------
Information Dashboard Development

decius
decius

Member

Member

26 points

66 Posts

Re: Skinnable Controls with generic.xaml

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
Jac_P

Participant

Participant

1044 points

189 Posts

Re: Skinnable Controls with generic.xaml

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. :-).

Thanks
Jac

pkr2000
pkr2000

Participant

Participant

1219 points

377 Posts

Answered Question

Re: Skinnable Controls with generic.xaml

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.

decius
decius

Member

Member

26 points

66 Posts

Re: Skinnable Controls with generic.xaml

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"

pkr2000
pkr2000

Participant

Participant

1219 points

377 Posts

Re: Skinnable Controls with generic.xaml

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...

 

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities