tags:

views:

401

answers:

2

XAML is supposed to be "Extensible Application Markup Language" - i.e. a generic, flexible framework for creating application markups. However, most searches for XAML yield either WPF or Silverlight-specific materials.

The only exception at this time (that I am aware of) is Oslo framework (M-language & co.) - proving that XAML can be used outside of the presentation layer.

I'm looking for information on how to include XAML in my own application. How can I serialize my application's object into XAML and then deserialize this XAML into a new instance of this object? Is there official MSFT information on this? What about generic XAML support in .NET BCL?

+1  A: 

There's support for XAML in the .Net BCL in the System.Windows.Markup namespace. It has classes that can load and understand XAML fragments.

sipwiz
I will accept this answer because although System.Windows.Markup namespace is theoretically part of WPF, it does support generic object serialization/deserialization. I would still welcome any information about XAML usage in .NET outside of context of WPF.
Milan Gardian
+1  A: 

Take a look at the XamlReader class

Sean
System.Windows is a WPF namespace. From MSDN: "Provides several important Windows Presentation Foundation (WPF) base element classes, various classes that support the WPF property system and event logic, and other types that are more broadly consumed by the WPF core and framework."
Milan Gardian
Yes, and...? There's nothing in the XamlReader/Writer classes that restrict them to presentation related services. To quote from XamlReader : "Provides the means to parse XAML markup into an object or a tree of objects. "
Sean
You are right, see my comment for sipwiz answer.
Milan Gardian