silverlight渐隐效果

<UserControl x:Class="SLDome.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <Button Name="btn" Width="300" Height="300" >
            <Image Name="img" Width="200" Height="200" Source="img/1.jpg" >
                <Image.OpacityMask >
                    <LinearGradientBrush StartPoint="0,1" EndPoint="1,0">
                        <GradientStop Color="Blue"  Offset="0" ></GradientStop>
                        <GradientStop Color="Transparent"  Offset="1" ></GradientStop>
                    </LinearGradientBrush>
                </Image.OpacityMask>
            </Image>
           
        </Button>
    </Grid>

</UserControl>





原文链接: http://blog.csdn.net/mypc2010/article/details/7944125

你可能感兴趣的:(silverlight渐隐效果)