I am trying to set rounded corner of TextBlock
in xaml
. But there is no such property.
<Grid x:Name="grdDis" Grid.Row="1">
<TextBlock Text="Description" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Name="txtDescription" Margin="18,10,0,0" Height="128" Width="445"/>
</Grid>
How can I set rounded corner of TextBlock. And also want to set Background color of TextBlock.
Use Border
:
<Border Margin="5" Padding="5" BorderThickness="1" BorderBrush="Red" Background="AntiqueWhite" CornerRadius="10">
<TextBlock Text="Lorem ipsum"/>
</Border>
Result: