Posted in Windows 10 UWP, WIN_7

How to show image in circle shape

In this article we are going to see how to show the image in circular shape and decode the pixel in windows 10 UWP.

To perform this task we are going to use two controls Ellipse and ImageBrush.

The following code will show image we set to the ImageBrush as circular

<Ellipse Width="150" Height="150">
            <Ellipse.Fill>
                <ImageBrush ImageSource="Assets/w10.jpg" />
            </Ellipse.Fill>
   </Ellipse>

You can set the ImageSource as url like the following code

<Ellipse Width="150" Height="150">
       <Ellipse.Fill>
            <ImageBrush ImageSource="http://csharpcorner.mindcrackerinc.netdna-cdn.com/UploadFile/AuthorImage/2b876a20140602051459.png" />
       </Ellipse.Fill>
 </Ellipse>

Now run the app and looks the output like the following image

2015-12-31_1213