First of all, my business is UWP applications.
TextBlock
has a property with a name SelectionHighlightColor
that allows you to specify a specific color Selection Area
when choosing text. Similar:
XAML:
<TextBlock Text="This is a sample text" IsTextSelectionEnabled="True" SelectionHighlightColor="#FFFFE751" Foreground="Black" />
This is displayed as:
If you have not noticed, the foreground text of the selected text will always be White
, even if the background of the selection area has a light color.
So, is there a way to change the foreground of the selected control text TextBlock
?
source
share