Problem with UNO style in MainPage.xaml #18914
-
Hi, What is wrong with my XAML code in MainPage.xaml TextBox_Source looks different from TextBox_Destination and TextBox_Game_Name. They should look the same. I want all three to look like TextBox_Destination. What is wrong with UniformTextBoxStyle? Thanks Ward ` Code:
` |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This may seems counter-intuitive, but you actually need to specify the Style.BasedOn when attempt to override it. This is not only the case for Uno, but for WinAppSdk as well: This should fix the problem you are encounting: <Style TargetType="TextBox" x:Key="UniformTextBoxStyle" BasedOn="{StaticResource MaterialOutlinedTextBoxStyle}"> You can find the |
Beta Was this translation helpful? Give feedback.
This may seems counter-intuitive, but you actually need to specify the Style.BasedOn when attempt to override it. This is not only the case for Uno, but for WinAppSdk as well:
This should fix the problem you are encounting:
You can find the
x:Key
of the default style for the Material theme here:https://platform.uno/docs/articles/external/uno.themes/doc/lightweight-styling.html#resource-keys