locked
Convert XBF to XAML RRS feed

  • Question

  • Hi,

    Windows 8.1 has new feature to convert XAML to XBF file format. How to Convert XAML to XBF and How to convert back to XBF to XAML file format. Please let me know any sample on converting XAML to XBF

    -Mahens


    Mahender

    Wednesday, November 6, 2013 1:38 PM

Answers

  • You can write XBF files with an XamlBinaryWriter. There isn't an explicit function to load XBF. They get pulled in from Application.LoadComponent. These are infrastructure functions not intended to be called directly by app code, so there aren't any samples.

    What is your use case here? Apps which need to load Xaml on the fly should use the XamlReader rather than XBF.

    --Rob

    • Marked as answer by Anne Jing Thursday, November 14, 2013 9:14 AM
    Wednesday, November 6, 2013 4:36 PM
    Moderator

All replies

  • You can write XBF files with an XamlBinaryWriter. There isn't an explicit function to load XBF. They get pulled in from Application.LoadComponent. These are infrastructure functions not intended to be called directly by app code, so there aren't any samples.

    What is your use case here? Apps which need to load Xaml on the fly should use the XamlReader rather than XBF.

    --Rob

    • Marked as answer by Anne Jing Thursday, November 14, 2013 9:14 AM
    Wednesday, November 6, 2013 4:36 PM
    Moderator
  • Some of Microsoft's own tooling has the ability to decompile XBF files (interesting). You can leverage it yourself as was done by the application at the following link:

    https://xamldecompiler.codeplex.com/

    Whether Microsoft publishes the format details or not, the format is now out in the wild.  If you can parse through c++ headers, the details are laid out here:

    https://github.com/WalkingCat/XbfDump

     

    • Proposed as answer by noemata Tuesday, November 11, 2014 7:55 PM
    Tuesday, November 11, 2014 7:54 PM