zoukankan      html  css  js  c++  java
  • wpf倒影效果

    <Window x:Class="WpfApplication2.Window6"
    xmlns
    ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x
    ="http://schemas.microsoft.com/winfx/2006/xaml"
    Title
    ="Window6" Height="800" Width="400" Background="#FF840909">
    <Viewbox>

    <StackPanel Margin="10">

    <Border BorderBrush="White" BorderThickness="8"
    Width
    ="262.999" Height="354.833" Background="#FF130202">

    <Image x:Name="myVisual" Stretch="Fill"
    Source
    ="/WpfApplication2;component/images/e31b7dcada9a3077b700c8ea.jpg" />

    </Border>

    <Border BorderBrush="White" BorderThickness="8" Width="263.621" Height="185.429">

    <Border.RenderTransform>

    <SkewTransform CenterX="0" CenterY="0" AngleX="-50" AngleY="0"/>

    </Border.RenderTransform>

    <Border.OpacityMask>

    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">

    <GradientStop Offset="0" Color="#FF000000"/>

    <GradientStop Offset="0.8" Color="#00000000"/>

    </LinearGradientBrush>

    </Border.OpacityMask>

    <Border.Background>

    <VisualBrush Visual="{Binding ElementName=myVisual}">

    <VisualBrush.RelativeTransform>

    <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="0.5" CenterY="0.5"/>

    </VisualBrush.RelativeTransform>

    </VisualBrush>

    </Border.Background>

    </Border>

    </StackPanel>

    </Viewbox>
    </Window>

    效果图如下:

  • 相关阅读:
    本机可以,服务器却不行
    学习摘录1Hello, World!
    钻石问题
    OPEN OFFICE使用技巧
    操作符的重载
    函数重载
    关于“结构”好别扭的一段话
    多重继承
    OPEN OFFICE操作技巧3
    70个现代风格的HTML5 WordPress主题网站
  • 原文地址:https://www.cnblogs.com/zhangtao/p/2347548.html
Copyright © 2011-2022 走看看