WPF/E and MHTML RRS feed

  • Question

  • Hi,

    I'm developing an application that creates tutorials from images and captions, and I'd like to be able to save a WPF/E presentation (including a html file, a xaml file, two js files, and any accompanying images) as a web archive(*.mht) that can be opened in IE.

      Currently, I've been able to spit out a .mht file as a multipart/related mime file, which I understand is the standard for IE's web archive format.  I've had no trouble getting IE to display a html page with an image contained in it.  All text is encoded with the "quoted-printable" standard under the utf-8 charset.  The images are encoded with base64.  However, when I add the xaml and js files to the archive, I'm unable to get the control to load properly.  The WPF/E control gets created on the page, but the xaml content is not loaded(and subsequently the presentation is not started).  I'm wondering if I have the content-type wrong on either the .js or the .xaml file.  I've tried "application/octet-stream"(IE includes js files as this type) and "text/javascript" for the js files.  I've tried "application/xaml+xml", "text/xml", "text/xaml" for the XAML file.

      I guess I'm wondering if it is at all possible to create a web archive of a page that includes a WPF/E control.  Note that I'm generating all the files at runtime, so it's not feasible for me to use the canned .NET methods to generate MHTML files.

    Wednesday, April 18, 2007 6:28 PM