I have this in XAML in my style:
<DataTrigger Binding="{Binding Path=ButtonStyle}" Value="CutLeft">
<DataTrigger.Setters>
<Setter Property="CornerRadius" TargetName="border" Value="0 11 11 0" />
<Setter Property="CornerRadius" TargetName="border1" Value="0 10 10 0" />
</DataTrigger.Setters>
</DataTrigger>
And this XAML in my Window where i have the button:
<gui:MyCustomButton ButtonStyle="CutLeft"/>
And in MyCustomButton code:
public enum ButtonStyles {
CutLeft, CutRight, Circular, Normal
}
public partial class MyCustomButton
{
[DefaultValue(ButtonStyles.Normal)]
public ButtonStyles ButtonStyle { get; set; }
}
But it doesn't work! Any tips?