wpf keep base style in custom control
- by Archana R
Hello,
I have created a custom button as i wanted an image and a text inside it as follows:
<Style TargetType="{x:Type Local:ImageButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Local:ImageButton}">
<StackPanel Height="Auto" Orientation="Horizontal">
<Image Margin="0,0,3,0" Source="{TemplateBinding ImageSource}"/>
<TextBlock Text="{TemplateBinding Content}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Here, ImageButton is a class which inherits from Button class and has ImageSource as a dependency property.
But i want to keep the look and feel of the original button.
How can i do it?
Thanks.