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>

    效果图如下:

  • 相关阅读:
    动态投影
    我的比较差的初级的研究成果
    我最近的研究成果(IGeometry.Project and IGeometry.SpatialReference)
    mysql中的数据类型以及常见约束
    面向对象——多态
    java基础
    java中的异常(3)
    mysql中的数据类型
    面向对象——继承
    java中的异常(2)
  • 原文地址:https://www.cnblogs.com/wpf123/p/2097511.html
Copyright © 2011-2022 走看看