如何在Silverlight中实现“帧效果”

时间:2010-11-17 08:24:22

标签: silverlight xaml

我想重现这种效果: alt text

我如何处理xaml?

(请注意,文字可以是变量)

提前感谢您的帮助

1 个答案:

答案 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>