locked
Rendering UI element to image

    Question

  • Hello. 

    Please tell me how to make a screen UI element, if the element is not rendered? 
    This feature only appeared in Windows 8.1. And unfortunately, it does not renders the elements that are not in the tree, for example, how it works on Windows Phone. Also, do not render if the item is Collapsed. 
    Nobody faced with such a problem? And is there any chance to resolve it? Though using C + +.

    Thanks

    Wednesday, April 30, 2014 3:37 PM

Answers

  • There is no way to render a Xaml element other than RenderTargetBitmap, with the limitations you mention (see the Remarks in the RenderTargetBitmap class documentation). Changing languages doesn't affect this.

    Note that the object doesn't have to be visible to the user. As the remarks mention, the UIElement can be off screen or hidden behind another element, so long as it's not Collapsed. You can use this to render a UIElement without showing it to the user.

    --Rob

    Wednesday, April 30, 2014 4:04 PM
    Owner

All replies

  • There is no way to render a Xaml element other than RenderTargetBitmap, with the limitations you mention (see the Remarks in the RenderTargetBitmap class documentation). Changing languages doesn't affect this.

    Note that the object doesn't have to be visible to the user. As the remarks mention, the UIElement can be off screen or hidden behind another element, so long as it's not Collapsed. You can use this to render a UIElement without showing it to the user.

    --Rob

    Wednesday, April 30, 2014 4:04 PM
    Owner
  • Thanks, Rob!
    Sunday, May 04, 2014 11:07 AM