tags:

views:

485

answers:

4

What is the best way to serialize a wpf element tree to xaml so that I can get a design time representation?

XamlWriter.Save is having serious limitations, and it can provide only the run-time representation

Probably Microsoft don't want any one to build a customized xaml designer with out much effort :(

A: 

Just un clip the xml unit eliminator and reroute both partial array procedures into the wpf tree. then create the object as a time line.

simples

Tom
you can make that joke more entertaining with an example
amazedsaint
A: 

You can study the source code of Mole and create your own code that can do it for you.

Mole For Visual Studio - With Editing - Visualize All Project Types

abmv
Already had a look in to Mole, it is creating only the run time xaml representation
amazedsaint
+1  A: 

As I understand, there is no direct way to get the design time representation of xaml from the visual tree. :)

amazedsaint
Make your own xaml designer!
abmv
Yep, that is what we are doing. The whole idea is to see whether we can work against the visual tree, or to provide a custom dom. We ended up with a custom dom. Thanks
amazedsaint
But you know Custom dom has high maintenance - how are you going to manage that?
Vin
The custom dom is based on a configuration, so we need to maintain the configuration :)
amazedsaint
A: 

We have a XAML designer product which emplores a custom XAML serializer. As it is, that is the most useful solution for us. However, with .Net 4, there are a lot of great options (and helpers) for doing exactly that task. So, if you're not afraid of a little betaness, I would start looking there.

Check out what Guy Burstein has to say about it.

MojoFilter