Silverlight学习笔记之文字特效之ImageBrush

使用Silverlight创建文字遮罩特效要比Flash中的遮罩效果简单一些,ImageBrush可以轻松帮你搞定,不说费话,一看代码便知!
代码如下:
<Canvas
        xmlns=" http://schemas.microsoft.com/client/2007"
        xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml"
        x:Name="parentCanvas"
        Loaded="Page_Loaded"
        x:Class="DFModules.Page;assembly=ClientBin/DFModules.dll"
        Width="640"
        Height="480"
        Background="White"
        >
    <TextBlock
        Text=" http://BLOG.CSDN.NET/DOTFUN"
        Canvas.Top="195"
        FontFamily="Verdana"
        FontWeight="Bold"
        FontSize="30" Canvas.Left="42">
        <TextBlock.Foreground>
            <ImageBrush ImageSource="5.jpg" />
        </TextBlock.Foreground>
    </TextBlock>

    <TextBlock
        Text=" WWW.DOTFUN.CN"
        Canvas.Left="63.05" Canvas.Top="244"
        FontFamily="Verdana"
        FontWeight="Bold"
        FontSize="50">
        <TextBlock.Foreground>
            <ImageBrush ImageSource="4.jpg" />
        </TextBlock.Foreground>
    </TextBlock>

</Canvas>
 

本文出自 “WPF外包公司―北京动点..” 博客,转载请与作者联系!

你可能感兴趣的:(笔记,文字,silverlight,特效,ImageBrush)