我想重现这种效果:
我如何处理xaml?
(请注意,文字可以是变量)
提前感谢您的帮助
答案 0 :(得分:4)
您可以通过边框和网格面板的组合轻松实现此目的:
<Grid Width="200" Height="200" VerticalAlignment="Center" HorizontalAlignment="Center">
<Border BorderThickness="1" BorderBrush="Black" Margin="0,7,0,0">
<TextBlock Text="Lorem Ipsum..." Margin="20"/>
</Border>
<Border Background="White" Margin="10,0,10,0" HorizontalAlignment="Left" VerticalAlignment="Top">
<TextBlock Text="My Title" />
</Border>
</Grid>