Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where has TextBlock Background property gone in UWP?

Tags:

xaml

uwp

I need to change the Background of a TextBlock in UWP but the Background property no longer exists. What is the solution for this?

This don't work...

                    <TextBlock Text="Exceptions Log"
                               FontSize="10"
                               Background="Red" // This is invalid
                               />

Thanks

like image 723
Ian GM Avatar asked Dec 07 '15 10:12

Ian GM


1 Answers

Just put it inside a Grid or a Border or something else...

<Border Background="Red">     <TextBlock Text="Exceptions Log"                FontSize="10" /> </Border> 
like image 117
Igor Ralic Avatar answered Oct 03 '22 15:10

Igor Ralic