Windowscommunitytoolkit: Add support to CornerRadius for ImageEx control

Created on 1 Sep 2016  路  5Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

It would be nice to have this effect with ImageEx to take advantage of ImageCache.

ImageEllipse

controls feature help wanted

Most helpful comment

Not an unreasonable feature request :)

All 5 comments

Not an unreasonable feature request :)

I've been given this a look at using the simple method of restructuring the XAML to use borders with ImageBrush backgrounds which allows easy corner radius setting, but this means we can't use the NineGrid property anymore. You'd also have to lose GetAsCastingSource() so I don't think that's a good option.

The next obvious solution is to rewrite the whole thing to be Win2D based (which would also enable you to do more extravagant additions in the future), but that would make GIF image support more complex and processor intensive, and on top of that I've never seen a Win2D image control solution perform as well as standard image in list based virtualization scenarios.

So unless anyone has any better ideas, my current thought is there's not a nice way to keep this highly performant and add this without breaking changes.

@JohnnyWestlake yup, that's basically the place both @hermitdave and I got to over the weekend too :)

Ok so I will close it for now as we do not have a good solution

@JohnnyWestlake If the control can be restructured with Borders, but at the cost of Functionality, could a Second Control be created called something like RoundedImageEx, and shared code moved into a Base Class?

Was this page helpful?
0 / 5 - 0 ratings