How to make a round Image, so that the picture you put in it, cut off all the edges that are around? If the picture is large, I want it to draw only the center of the picture and not display the edges. I try to do it like this, but this effect does not suit at all:

<Border BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="50,50,50,50"> <Image Width="100" Height="100" Source="image.jpg"></Image> </Border> 

enter image description here

    1 answer 1

    Just take the picture instead of Ellipse , and put the picture as Fill . Ellipse will set the form, and the picture - filling.

     <Ellipse Width="100" Height="100"> <Ellipse.Fill> <ImageBrush ImageSource="Resources/bg.png" Stretch="UniformToFill"/> </Ellipse.Fill> </Ellipse> 

    Result:

    round picture

    • That is what you need. Thank! - Lightness
    • @Lightness: Please! - VladD