WPF写圆形头像,带消息提醒图标

<DockPanel VerticalAlignment="Top" HorizontalAlignment="Stretch" Margin="0" Height="100" >
<DockPanel.Background>
<LinearGradientBrush StartPoint="0.5,1" EndPoint="0.5,1" Opacity="0.5">
<GradientStop Offset="0.097" Color="#E6E6E6"></GradientStop>
<GradientStop Offset="0.227" Color="#E6E6E6"></GradientStop>
<GradientStop Offset="0.428" Color="#E6E6E6"></GradientStop>
<GradientStop Offset="0.779" Color="#E6E6E6"></GradientStop>
<GradientStop Offset="0.946" Color="#FFE7E7E7"></GradientStop>
</LinearGradientBrush>
</DockPanel.Background>

//开始头像
<Ellipse Cursor="Hand" Height="80" Width="80" Margin="25,10,0,10">
<Ellipse.Fill>
<VisualBrush>
<VisualBrush.Visual>
<Image x:Name="image" Source="/ppm.ec.erp.fore.Main;component/Resources/Imgs/testuser2.png"/>
</VisualBrush.Visual>
</VisualBrush>
</Ellipse.Fill>
</Ellipse>

//头像结束

//定位 消息提醒图标开始

<Canvas>
<Label x:Name="PushMsg" Width="25" Height="25" Foreground="#fff" Canvas.Left="-15" Canvas.Top="10" Content="99+" HorizontalAlignment="Center" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Center" FontSize="11">
<Label.Background>
<ImageBrush ImageSource="/ppm.ec.erp.fore.Main;component/Resources/Imgs/pushmsg.png"></ImageBrush>
</Label.Background>
</Label>
</Canvas>
 //定位消息提箱图标结束
</DockPanel>

转载于:https://www.cnblogs.com/zhixiaoxiao/p/8334668.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值