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