Closed Morasiu closed 2 years ago
By setting a style like this your are throwing away Adonis UI's default style and the system fallback gets used instead. In order to add to Adonis UI's default style you need to base your style on it:
<Button.Style>
<Style BasedOn="{StaticResource {x:Type Button}}">
</Style>
</Button.Style>
For further information see for example this stackoverflow thread.
On a personal note, it seems that you only want to set the button's IsEnabled
property. This can be achieved without creating a style much easier:
<Button IsEnabled="{Binding IsIgnored, Converter={StaticResource InverseBooleanConverter}}"/>
You can create the converter on your own or use one of many libraries that offer those. See this stackoverflow thread or make use of NKristek.Wpf.Converters or Kent.Boogaart.Converters for example.
Hello
I have a simple button like this.
But when I apply some style Trigger it breaks!
My code:
How can I properly use Adonis with
Style Triggers
?