我目前所拥有的只是宽度:
<Grid>
<Rectangle Fill="#FFF5F7F9" HorizontalAlignment="Left" Height="80" Stroke="#FF565656" VerticalAlignment="Top" Width="128" RadiusY="15" StrokeThickness="3" RadiusX="15"/>
<TextBlock HorizontalAlignment="Left" Height="47" TextWrapping="Wrap" Text="Draft" VerticalAlignment="Top" Width="106" FontSize="32" FontStyle="Italic" FontFamily="Verdana" Margin="20,21,0,0"/>
</Grid>
等同于html的东西(仅举例):
<div style="display:inline;border:solid 3px #000;padding:3px">
Some text here
</div>
答案 0 :(得分:1)
发现它......为这个非常棒的问题而烦恼。
<Border
BorderThickness="2"
BorderBrush="Black"
Background="AliceBlue"
HorizontalAlignment="Left"
VerticalAlignment="Top" Padding="10">
<TextBlock>Hello World!</TextBlock>
</Border>