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

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s