It's annoying when you can write an entire application in XAML but you just need a little bit of code. Regardless how little it is, it means you'll need to make it an XBAP or an EXE when you'd really just prefer to distribute some XAML. If the only code your XAML file needs is a static MeshGeometry3D from the Petzold.Media3D library (available here ) you have a solution: The sample code from Chapter 6 of 3D Programming in Windows includes a program named MeshGeometry3DExtractor. The program finds all the classes in the Petzold.Media3D library that have public properties of type MeshGeometry3D and lists them in a ListBox . After you select one, it then lists all the settable public properites with TextBox controls so you can type in the values. (Unfortunately, it's not as fancy as the WinForms PropertyGrid ; you have to type in something acceptable to the property type's Parse method.) Then, through the magic of XamlWriter.Save , it dumps the class's generated MeshGeometry3D object into
Read More...