<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="DropShadow.ImageReflection" x:Name="Window" Title="ImageReflection" Width="400" Height="800" Background="#FF840909"> <Viewbox> <StackPanel Margin="10"> <Border BorderBrush="White" BorderThickness="8" Width="262.999" Height="354.833" Background="#FF130202"> <Image Source="200706126569517.jpg" x:Name="myVisual" Stretch="Fill"/> </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> |
新闻热点
疑难解答