My current understanding around providing default style to Silverlight custom controls is to add Generic.xaml under Themes folder and pile default styles of all custom contols in that assembly.
I noticed the controls in Silverlight Toolkit have the default styles along side with control. For example Label.cs and Label.xaml are in the same folder and Label.xaml has a build action "Default Style". I can't find the build action if I create a standard
Silverlight library project. (I am using VWD Express 2008)
Is this a Visual Studio Extension built by the toolkit team?
Justin would know, but I dug into this a lot when they first released it and came to the conclusion they just included those files for reference. Could be wrong though. Justin?
-- bryant
Blog | Twitter _________________
Dont forget to click "Mark as Answer" on the post that helped you.
I compiled the Toolkit source and received no errors. (Didn't test the self-compild version to check if default styles apply)
Such arrangement of styles will be very valuable for conrol developers as default styles of each control can be organized across multiple files, preferably closer to control implementation. I suspect, the toolkit team built a custom build action for solving
the problem.
It will be a great help to the community if the toolkit team can share the custom build action (source and/or binary).
vplusplus
Member
10 Points
12 Posts
Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default style f...
Dec 23, 2008 12:25 AM | LINK
My current understanding around providing default style to Silverlight custom controls is to add Generic.xaml under Themes folder and pile default styles of all custom contols in that assembly.
I noticed the controls in Silverlight Toolkit have the default styles along side with control. For example Label.cs and Label.xaml are in the same folder and Label.xaml has a build action "Default Style". I can't find the build action if I create a standard Silverlight library project. (I am using VWD Express 2008)
Is this a Visual Studio Extension built by the toolkit team?
Silverlight 2 Custom Control
bryant
Star
10113 Points
1662 Posts
Re: Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default sty...
Dec 23, 2008 03:02 AM | LINK
Justin would know, but I dug into this a lot when they first released it and came to the conclusion they just included those files for reference. Could be wrong though. Justin?
Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.
vplusplus
Member
10 Points
12 Posts
Re: Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default sty...
Dec 23, 2008 01:24 PM | LINK
I compiled the Toolkit source and received no errors. (Didn't test the self-compild version to check if default styles apply)
Such arrangement of styles will be very valuable for conrol developers as default styles of each control can be organized across multiple files, preferably closer to control implementation. I suspect, the toolkit team built a custom build action for solving the problem.
It will be a great help to the community if the toolkit team can share the custom build action (source and/or binary).
m.wawrusch
Member
22 Points
18 Posts
Re: Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default sty...
Jan 10, 2009 01:32 PM | LINK
I definitely agree on that.
JWilcox
Participant
1106 Points
195 Posts
Microsoft
Re: Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default sty...
Jan 10, 2009 06:26 PM | LINK
This posting is provided "AS IS" with no warranties, and confers no rights.
JWilcox
Participant
1106 Points
195 Posts
Microsoft
Re: Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default sty...
Jan 14, 2009 06:48 AM | LINK
This posting is provided "AS IS" with no warranties, and confers no rights.
bryant
Star
10113 Points
1662 Posts
Re: Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default sty...
Jan 14, 2009 03:27 PM | LINK
Thanks Jeff! That's great.
Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.
m.wawrusch
Member
22 Points
18 Posts
Re: Build Action - DefaultStyle - Is this a new Visual Studio Extension for providing default sty...
Jan 14, 2009 03:37 PM | LINK
Thanks!!! That helps us tremendously