![]() ![]() Click OK to close the Scale Ranges editor.Click OK to close Scales - Element Designer.Seeing a trend that the new avatar shape in apps is a circle and no longer square - Tim Heuer MaI made a snarky comment about this myself almost exactly 2 years ago when I noticed that some apps I was using at the time switched to this: Then, you will see the following confirmation window.A long while back it seemed like the new cool app thing to do was to represent people/avatars in circles instead of the squares (or squares with rounded corners). ![]() ![]() Now since this seems to be a popular trend and people are doing it I’ve thought XAML folks have figured it out. However I’ve seen enough questions and some people trying to do a few things that make it more complex that I thought I’d drop a quick blog post about it. I’ve seen people trying to do profile pic upload algorithms that clip the actual bitmap and save on disk before displaying it to people stacking transparent PNG ‘masking’ techniques. None of this is needed for the simplest display. You’ll see that Line 3 shows us using an ImageBrush as the fill for an Ellipse. The above would render to this image as the example in my app: Using an Ellipse helps you get the precise circular drawing clip without having pixelated edges or anything like that. Now while this is great, using an ImageBrush doesn’t give you the automatic decode-to-render-size capability that was added in the framework in Windows 8.1. NOTE: This auto decode-to-render-size feature basically only decodes an Image to the render size even if the image is larger. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |