Dynamic View of XML

Apr 27, 2010 at 5:55 PM

I have an XML file that I am using to store application settings. Is it possible to use the WPF Property Grid control to show a dynamic view of the data in this file?

An example config file would be:


<?xml version="1.0" standalone="yes"?>


I realize that the best I can hope for from this is a textbox editor. Thats fine as a starting point.


Apr 27, 2010 at 9:02 PM

You can use the PropertyGrid, to show the Properties of a CLR Object!

If you create a CLR Object from your XML Data, it should be possible!

Apr 28, 2010 at 9:14 PM

I want to keep this all as late bound as possible. So how about something like loading the XML into a dataset, or using the XElement object?

May 6, 2010 at 5:39 PM

I don't think this is the task of a Property Grid!

Jun 15, 2010 at 8:47 PM

You may try using Linq to XSD. This is a simple way to manage xml files in a object oriented manner. You should be able to bind objects to WPG and make it live. I'll investigate this further because  I need the same functionality.

Mar 31, 2011 at 4:46 PM

Has any of you managed to solve this?


I want to bind the propertyGrid to XML. I do have a schema, and the schema will be describing what properties are "editable" in the propertyGrid.

Can I create data templates maybe as an alternative?


What I mean is binding to the xml, and using DataTemplate generated from schema?