Question

Currently i'am developing app that will be possible to share image, with information take it of longlistselector as is showed in app, i'am trying save an ui element as a image, i don't know how can i achieve this task.

In android i realized that is possible to do this with getDrawingCache , but in windows phone 8 if is it possible?. I won´t to create new image with each element of LLS,

How can i save UI longlistselector as a image in windows phone?

I tried to do screen shoot of the current view, but not of all elements of LLS are visible.

Thanks in advance!.

Was it helpful?

Solution

Put this code to the Image where you want to render and apply as source

var writeableBitmap = new WriteableBitmap((int)YourLongListSelector.RenderSize.Width, (int)LongListSelector.RenderSize.Height);

writeableBitmap.Render(YourLongListSelector, new ScaleTransform() { ScaleX = 1, ScaleY = 1 });
writeableBitmap.Invalidate();

image.Source = writeableBitmap;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top