AbuRaihan-7069 avatar image
0 Votes"
AbuRaihan-7069 asked RichardZhang-MSFT commented

How to set TextBlock background color for HighContrast Theme in UWP

In Microsoft UWP application I tried to set a TextBlock background color using Grid in XAML. It was okay for default theme. But When I enable HighContrast Theme, only the Filled Text portion is black color; while remaining portion of the TextBlock is changed according to HighContrast Theme. I also tried with Border but the problem still occurs. I also tried with Style property, same issue.

 <Grid Height="50" Width="500" Background="{ThemeResource SystemColorHighlightColor}">
         <TextBlock Text="High Contrast" Width="250" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"/>

Can anyone help me to fix this issue?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, I noticed that there is a same question on StackOverflow. Our team mate have already responded to you and will track your case there. If you have any questions about his reply, you can continue to ask.

0 Votes 0 ·

0 Answers