Search code examples
imagewindows-phone-7scale

WP7 equivalent of Android 9-patch or iOS UIImage rightCapWidth?


I'm working on a WP7 app and can't find any way to stretch an image only at a specific point (repeating that row of pixels). For example, if I have a box with rounded corners I want to stretch it to fill a specific area only I want to stretch just a few pixels in the center (horizontally and vertically) so that the corners are unmodified.

In Android you can do this with a 9 Patch image and in iOS UIImage provides methods such as rightCapWidth.

What's the equivalent for WP7?

Thanks.


Solution

  • There is, currently, no direct equivalent for WP7.
    You'll have to adjust the image as you need to for your requirements.

    As applying rounded corners to everything doesn't match the Metro design principals for the phone, I expect there is little reason for, or likelihood of, such functionlaity becoming part of the core APIs.