如何在 Windows Phone 上将方形图像制作为圆形图像 [英] How to make a squared image to a round image on Windows Phone

查看:27
本文介绍了如何在 Windows Phone 上将方形图像制作为圆形图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从 Windows 手机上的方形图像制作圆形图像?我有很多图像应该显示为一个圆圈.但是我该怎么做呢?

Is it possible to make a round image from a squared image on a Windows phone? I have a lot of images which should be displayed as a circle. But how can I do this?

推荐答案

在 XAML 中,您希望使用 Ellipse 控件制作圆.然后给它一个 ImageBrush 填充.

In XAML you want to make the circle using an Ellipse control. Then give it an ImageBrush fill.

<Ellipse Height="100" Width="100">
    <Ellipse.Fill>
        <ImageBrush ImageSource="YourImage.png"/>
    </Ellipse.Fill>
</Ellipse>

这篇关于如何在 Windows Phone 上将方形图像制作为圆形图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆