<Canvas Background="#CDFCAE"> <Rectangle Canvas.Left="20" Canvas.Top="80" Width="240" Height="136" RadiusX="15" RadiusY="15"> <Rectangle.Fill> <ImageBrush ImageSource="a1.png"></ImageBrush> </Rectangle.Fill> </Rectangle> <Image Source="b1.png" Canvas.Left="320" Canvas.Top="80"></Image> </Canvas>
<Canvas Background="#CDFCAE"> <Border BorderBrush="Black" BorderThickness="3" Width="220" Height="220" Canvas.Left="40" Canvas.Top="50"> <Image Source="a2.png" Stretch="None" Width="220" Height="220"></Image> </Border> <Border BorderBrush="Black" BorderThickness="3" Width="220" Height="220" Canvas.Left="330" Canvas.Top="50"> <Image Source="a2.png" Stretch="Uniform" Width="220" Height="220"></Image> </Border> <Border BorderBrush="Black" BorderThickness="3" Width="220" Height="220" Canvas.Left="330" Canvas.Top="330"> <Image Source="a2.png" Stretch="UniformToFill" Width="220" Height="220"></Image> </Border> <Border BorderBrush="Black" BorderThickness="3" Width="220" Height="220" Canvas.Left="40" Canvas.Top="330"> <Image Source="a2.png" Stretch="Fill" Width="220" Height="220"></Image> </Border> </Canvas>
<Canvas Background="#CDFCAE"> <Image Source="a1.png" Canvas.Left="40" Canvas.Top="80"></Image> <Image Source="a1.png" Canvas.Left="320" Canvas.Top="80"> <Image.Clip> <EllipseGeometry Center="120,68" RadiusX="100" RadiusY="60"> </EllipseGeometry> </Image.Clip> </Image> </Canvas>
<Canvas Background="#CDFCAE"> <Image Source="a1.png" Canvas.Left="160" Canvas.Top="80" Opacity="0.7"> <Image.OpacityMask> <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> <GradientStop Offset="0.0" Color="#00000000" /> <GradientStop Offset="1.0" Color="#FF000000" /> </LinearGradientBrush> </Image.OpacityMask> </Image> </Canvas>
本文出自 “TerryLee技术专栏” 博客,请务必保留此出处http://terrylee.blog.51cto.com/342737/67280
本文出自 51CTO.COM技术博客