locked
PlayTo - rendering UI rather than a media file

    Question

  • Is there any way to get PlayTo working where the input is not a standard movie/audio file but instead is a "video" of some XAML UI?  This could be just a mirror of the app itself but ideally this would be a separate set of UI -- not interactable by touching the TV obviously but just visible.

    I was thinking of creating some XAML and then rendering that to images and then splicing those together into a video.  I've found some references in WPF and Silverlight for rendering XAML to an image (e.g. http://blog.blueboxes.co.uk/2009/07/21/rendering-xaml-to-a-jpeg-using-silverlight-3/) but I'm not sure if all of these work or if just composing a video on the fly from individual frames and streaming that to the DLNA device is even technically feasible.  I'm also not sure if data binding and all those sorts of things are available for dynamically loaded XAML like these approaches generally take.

    If there's some much easier way to do this I'd certainly prefer that, of course. :)  I'm having trouble digging through the APIs though and finding a way to do this.  Any ideas?

     

    Sunday, September 18, 2011 7:58 AM

Answers

  • I don't think there will be a good way to do this with XAML UI. 

    I'm not 100% positive, but I don't think there's a way to render XAML into a bitmap like you can in WPF (RenderTargetBitmap) or Silverlight (WritableBitmap.Render).  You would need an application which renders the entire UI itself and can send that both to the screen and encode it into the video stream.

    --Rob

    Tuesday, September 20, 2011 3:00 AM
    Owner
  • I confirmed that there's no way to render XAML into a bitmap with the Developer Preview release.

    • Marked as answer by jm47 Friday, September 23, 2011 1:32 AM
    Tuesday, September 20, 2011 11:45 PM
    Owner
  • Hi jm47,

    This hasn't changed. There is still no way to render a Xaml UIElement into a bitmap in the Consumer Preview.

    --Rob


    Saturday, March 3, 2012 3:26 AM
    Owner

All replies

  • I don't think there will be a good way to do this with XAML UI. 

    I'm not 100% positive, but I don't think there's a way to render XAML into a bitmap like you can in WPF (RenderTargetBitmap) or Silverlight (WritableBitmap.Render).  You would need an application which renders the entire UI itself and can send that both to the screen and encode it into the video stream.

    --Rob

    Tuesday, September 20, 2011 3:00 AM
    Owner
  • I confirmed that there's no way to render XAML into a bitmap with the Developer Preview release.

    • Marked as answer by jm47 Friday, September 23, 2011 1:32 AM
    Tuesday, September 20, 2011 11:45 PM
    Owner
  • Is there now a way to do this in the Consumer Preview version?  I see from the APIs that XamlReader can load Xaml into an object in memory, but I haven't found an equivalent for RenderTargetBitmap in WPF.  Is there any way to take xaml and turn it into an image now?  I'm having trouble navigating the namespaces which vary somewhat from the WPF counterparts, unfortunately, but appreciate your help in trying to locate it.
    Friday, March 2, 2012 8:32 PM
  • Hi jm47,

    This hasn't changed. There is still no way to render a Xaml UIElement into a bitmap in the Consumer Preview.

    --Rob


    Saturday, March 3, 2012 3:26 AM
    Owner
  • Hi jm47,

    This hasn't changed. There is still no way to render a Xaml UIElement into a bitmap in the developer preview.

    --Rob

    That's unfortunate.  :(  I don't think it's feasible to do what I want without this, so if there's any chance feedback could help get this in here's my vote.

    At the same time, I appreciate the update and will focus on things that are more realistic.

    Saturday, March 3, 2012 9:19 AM
  • Rob,

    Did  "Xaml UIElement to bitmap conversion" get into the Release Preview ?

    If not, will it get into the final release of Windows 8 ?

    Thanks,

    Terry

    Tuesday, June 19, 2012 11:18 AM