Can I have two different Styles in a CustomControl
Posted
by Subhen
on Stack Overflow
See other posts from Stack Overflow
or by Subhen
Published on 2010-05-11T09:41:31Z
Indexed on
2010/05/11
9:44 UTC
Read the original article
Hit count: 280
Hi,
Can we have two different styles in generic.xaml setter template Property
Something like:
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:customLocalFolderButton">
**<----Style 1---->**
</ControlTemplate TargetType="local:customLocalFolderButton">
</Setter.Value>
<Setter.Value>
<ControlTemplate TargetType="local:customLocalFolderButton">
**<----Style 2---->**
</ControlTemplate TargetType="local:customLocalFolderButton">
</Setter.Value>
</Setter>
Now I want to load the styles , as per the requirement. The 1st Style Can have a Red Folder and the Second Style Can have Blue Folder .
The user can choose any of the theme and the choosen style(Either RedFolder or Blue) should be applied in the customControl it self.
Thanks, Subhen
© Stack Overflow or respective owner