Coming off of this question, I have a textbox defined as this:
<TextBox>
<TextBox.Background>
<VisualBrush Stretch="Uniform">
<VisualBrush.Visual>
<StackPanel>
<TextBlock Background="Blue" Opacity="0.5" Text="155"/>
</StackPanel>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Background>
</TextBox>
This results in a TextBox
like this:
Now if I remove the background property, the TextBox
looks like this:
What I want is to achieve the second image with a colored background. In the first image for example, I want the background colour to fill the remaining whitespaces as well.