Skip to main content
Home Forums Silverlight Programming Programming with .NET - General problems using VSM
1 replies. Latest Post by clint1222 on July 3, 2009.
(0)
waged
Member
0 points
1 Posts
07-03-2009 7:58 PM |
hi guys,
i have this silverlight application i am creating, i made a button tamplate and storyboards to control it. works beautiful, but now i want to add the rest of the buttons and apply all storyboards to all buttons when using MouseEnter, MouseLeave etc and i cant do it. i could of course devlop redundant code to apply to all of them but that is gonna be really long and ineffeicnt can any1 help me please?
clint1222
Participant
1542 points
216 Posts
07-03-2009 9:47 PM |
Hi waged,
In Blend you would right click on the new button, select Edit Control Parts (Template), then select Apply Resource, and select the template you created.
The resulting xaml is the template attribute is added to the new button
Template="{StaticResource yourTemplateName}"