I need transparent text with opaque background with WPF/XAML. Is that possible?
Here is an example, but I don\'t use css: css, transparent text with opaque background
You can set it using the Opacity
property on the SolidColorBrush
. It takes values from 0 to 1. Where 0
is complete transparency and 1
complete opacity. But if you set the text transparent then what you will see is the background of the text box. In the example I've set partial opacity so you can see the text is greyish.
Other thing to get the transparency and see the background of the control beneath the text block is to set transparent foreground and partially transparent background.