Silverlight中类似于艺术字的文字渐变效果

新建silverlight项目,双击MainPage.xaml,插入下面的代码

<Grid x:Name="LayoutRoot" Background="White">
<TextBlock Text="第一个Silverlight程序!"
FontSize
="56"
FontFamily
="Arial">
<!--使用渐变画刷填充文本产生渐变效果-->
<TextBlock.Foreground>
<LinearGradientBrush
EndPoint
="0.5,1"
StartPoint
="0.5,0">
<!--声明渐变的两种颜色分别为黑色和白色-->
<GradientStop Color="Black"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</TextBlock.Foreground>
</TextBlock>
</Grid>

界面效果:

posted @ 2011-07-12 15:06  然嗄  阅读(157)  评论(0)    收藏  举报