0
我正在关注具有此xaml的代码示例,但是如何以编程方式构造此代码并将其添加到画布?如何通过编程方式将文本添加到画布?
<custom:BalloonDecorator Background="{StaticResource MessageOutBackground}" PointerLength="10"
CornerRadius="5" Margin="10,0,0,0"
HorizontalAlignment="left">
<Border Background="{StaticResource Hilight}" CornerRadius="5">
<Border Background="{StaticResource HilightBottom}"
CornerRadius="5">
<TextBlock Text="Hello" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</Border>
</Border>
</custom:BalloonDecorator>
但我怎么能装饰我的TextBlock编程?像myTextBlock.style = myDecorator; ? – 0x4f3759df 2011-01-10 19:53:20