Reputation: 22859
One simple way to add some configuration is to define a configuration section which is not much more than some object that can be (de)serialized based on the XmlSerializer classes.
Now, XAML is at its heart more or less a hierarchy of objects but provides things like naming of elements, binding, etc.
Has anyone ever used XAML outside its intended scope of declaratively defining WPF / Silverlight UIs, e.g. to set up a class that contains configuration settings? What would be the merits of doing so or why is it a bad idea?
Upvotes: 0
Views: 70
Reputation: 38130
I'd say it doesn't make much sense, when you could just use an app.config file (which is XML, and can support custom sections) - the framework has much better support, as this is its defined purpose.
Upvotes: 2