-
This is a TextBox: <TextBox Text="zzz" VerticalAlignment="Top"/> But its color is inherited from the |
Beta Was this translation helpful? Give feedback.
Answered by
SKProCH
Jun 21, 2024
Replies: 2 comments 6 replies
-
Hello, @SinoAHpx You can directly set colors, e.g.: <TextBox Background="Blue" /> Or, alternative way is to override a resource values which TextBox uses. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Original: <TextBox Text="AWDAWD" /> With <TextBox Background="Indigo" Text="AWDAWD"/> |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, you want override a PrimaryColor for a certain control only? You can actually do it by overriding a resource near the control (Avalonia looks for resources starting from the control and climbing up in visual tree, App resources used when nothing found previously). So, you can do something like this:
Default style for TextBox underline utilizes the following keys:
MaterialTextBoxBorderBrush
andMaterialPrimaryMidBrush
.