Skip to content

Cannot change textbox color (while writing) #19616

Answered by kazo0
MeetRajput00 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello!

This would typically be done through the use of Lightweight Styling. The OutlinedTextBoxStyle inside of Uno Material changes the Foreground of the PlaceholderText based on the current Visual State. For reference, this is where that happens: https://github.com/unoplatform/Uno.Themes/blob/74567f3f629fef5ed52018ddc4579ec209d894eb/src/library/Uno.Material/Styles/Controls/v2/TextBox.xaml#L666-L696

There is a dedicated SolidColorBrush resource for each of the visual states relating to the placeholder foreground. These resources are overridable and can be customized.

You can find all of the overridable resources and their default values for the TextBox here: https://platform.uno/docs/arti…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MeetRajput00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants