图像的只有两个圆角在Silverlight XAML C# [英] Image with only two rounded corners in silverlight xaml c#

查看:112
本文介绍了图像的只有两个圆角在Silverlight XAML C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能是只有两个圆角显示在XAML图像

How I can display images in xaml with only two rounded corners?

<Image x:Name="Image" Height="200" Width="250" Source="image.jpg" Stretch="Fill">
   <Image.Clip>
      <RectangleGeometry RadiusX="20" RadiusY="20" Rect="0,0,250,200"/>
   </Image.Clip>
</Image>



我想只有两个底角圆。

I want only two bottom corner round.

感谢

推荐答案

使用的为您的图片边境和指定的CornerRadius 财产

<Grid>
    <Border Height="200" Width="250" CornerRadius="0,0,50,50">
        <Border.Background>
            <ImageBrush ImageSource="Images/Desert.jpg" />
        </Border.Background>
    </Border>
</Grid>

和使用图像作为背景刷

下面是例子这一XAML。只要改变的ImageSource

Here is example with this xaml. Just change ImageSource

这篇关于图像的只有两个圆角在Silverlight XAML C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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