Image with only two rounded corners in silverlight xaml C #

How can I 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 corners around.

thank

+5
source share
1 answer

Use a Border for your image and specify the CornerRadius property

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

And use the image as a background brush

Here is an example with this xaml. Just change ImageSource

enter image description here

+20
source

All Articles