Create a UIImage from a DataTemplate #12027
Answered
by
jeromelaban
MarcAntoineHien
asked this question in
Q&A
-
Hello ! I was wondering if there is a simple way to take a DataTemplate and create a UIKit.UIImage from it ? Thanks ! |
Beta Was this translation helpful? Give feedback.
Answered by
jeromelaban
Apr 24, 2023
Replies: 1 comment 2 replies
-
@kazo0 any idea how I can do that ? Starting from a DataTemplate, I need to convert its content into a Bitmap to then use that Bitmap to create a UIImage. I think this is the way to go, but maybe there is another better way to convert de DataTemplate to a UIImage. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Kazo @MarcAntoineHien Indeed, you will not be able to take an image of a
DataTemplate
, but you may be able to useRenderTargetBitmap
to render theDataTemplate
in aContentControl
usingContentControl.ContentTemplate
. See this documentation on how to use it.