December 2014
Intermediate to advanced
512 pages
17h 4m
English
RenderTargetBitmap enables you to take a screenshot of any UIElement, even your entire Page! To use it, instantiate one and then call its RenderAsync method with the root UIElement to capture:
RenderTargetBitmap rtb = new RenderTargetBitmap();await rtb.RenderAsync(element);
Because RenderTargetBitmap is an ImageSource, you can use it as the source of any Image element. To extract the image data to use for other purposes, you call GetPixelsAsync to get back an IBuffer:
IBuffer buffer = await rtb.GetPixelsAsync();
From this point, you can interact with the IBuffer the same way you would with one obtained from WriteableBitmap, such as calling ...
Read now
Unlock full access