基本信息
源码名称:wpf圆形头像示例代码
源码大小:0.82M
文件格式:.rar
开发语言:C#
更新时间:2016-06-21
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
<Window x:Class="WPFTest01.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
xmlns:converter="clr-namespace:WPFTest01.Converters">
<Window.Resources>
<converter:PathToImageConverterLeft x:Key="leftImageConverter"/>
<GeometryGroup x:Key="clipGeometry" FillRule="Nonzero">
<EllipseGeometry RadiusX="90" RadiusY="90" Center="90, 90"></EllipseGeometry>
</GeometryGroup>
</Window.Resources>
<Grid>
<Image Source="{Binding LeftPicture, Converter={StaticResource ResourceKey=leftImageConverter}}"
Height="180" HorizontalAlignment="Center" VerticalAlignment="Center"
Name="image1"
Stretch="Fill"
Width="180"
Clip="{StaticResource ResourceKey=clipGeometry}"/>
<Ellipse
HorizontalAlignment="Center"
Width="180"
Height="180"
Stroke="White"
VerticalAlignment="Center"
StrokeThickness="2"
>
</Ellipse>
</Grid>
</Window>