Search code examples
xamarinxamarin.iosxamarin.androidxamarin.forms

Save Xamarin.Forms.VisualElement to a bitmap image


Is it possible to render a VisualElement as an image?

I'd like to save screenshots of some of my UI's elements in my Xamarin.Forms application.


Solution

  • You can't. Xamarin does not have that kind of feature. You should write a Renderer for your UIComponent.

    Fortunately there is an Objective-C iOS implementation, and an Android one as well. You can inspire from them.