I need to create and use 9-patch image ( *.9.png, like in android) in WPF-app!
Only one question – HOW?
I need to create and use 9-patch image ( *.9.png, like in android) in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
WPF doesn’t support 9-patch format out of the box that I’m aware of, so you’re looking at a custom control – that said, I imagine it’d be one of the more “reasonable” controls to put together: really you’d be looking at setting up…well, to be simple, 9 different Images, each set Stretch to extents, all wrapped within a…oh, let’s pick a DockPanel for the hell of it. The control template might look something like:
(warning: slightly inebriated and free-handling this on a bloody phone, so likely not compile-able…in fact, now that I think of it, a Grid would probably be a wiser choice (3×3 rows cols, each cell with an image), but I shall persist in my original suggestion!)