mui
mui copied to clipboard
Styling a Custom Control
My full question is here: How to make a custom control follow the current “theme/style” on WPF?
But then, if it is not possible, I would like something like
<Style TargetType="{x:Type xctk:IntegerUpDown}" >
<Setter Property="Background" Value="{Binding Background, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TextBox}}" />
<Setter Property="Foreground" Value="{Binding Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TextBox}}" />
<Setter Property="BorderBrush" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TextBox}}"/>
<Setter Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TextBox}}"/>
</Style>