-
|
Hi, I'm struggling on resolving conflict between my custom styles and Modern Style. For example, after I adding a custom style of button into App.xaml --- ResourceDictionary ---
<Style
TargetType="Button"
x:Key="PickButtonStyle">
<Setter Property="Width" Value="50" />
</Style>
--- view ---
<Button
Style="{StaticResource Settings.PickButtonStyle}" />I also tried to add How could I style Modern Style in custom? |
Beta Was this translation helpful? Give feedback.
Answered by
NotYoojun
Nov 9, 2025
Replies: 1 comment
-
|
Example: <Style x:Key="MyToolboxButton" TargetType="Button"
- BasedOn="{StaticResource {x:Type Button}}">
+ BasedOn="{StaticResource {x:Static ui:ThemeKeys.DefaultButtonStyleKey}}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Margin" Value="2"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
</Style>If this helps, please mark it as answer, otherwise just ask. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Supheria
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
If this helps, please mark it as answer, otherwise just ask.