I am facing problem in setting the background of textblock in Windows Phone.
<TextBlock Text="Forget Password" Height="19" Width="156">
The TextBlock element cannot display a background image. You can display an image behind your TextBlock as follows:
<Grid>
<Image Source="..."/>
<TextBlock Text="Forget Password" Height="19" Width="156">
</Grid>
You might have to apply a suitable Margin or padding to your image for this to work.
If you want to add images to a number of TextBlocks, you might want to consider re-templating yor TextBlock via a Style.
You can use a border control to contain the TextBlock
:-
<Border Background="{StaticResource KeyToDesiredBackgroundBrush}">
<TextBlock Text="Forget Password" Height="19" Width="156" />
</Border>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With