title: Use a DataGrid as an ItemsControl in WPF
body: <p>I'm in the beginning phases of development for an application that allows the User to create, modify, and delete items in a collection.  The items within the collections will have different properties and allowed input for those properties based on the selection of the item's Type.</p>
  
  <p>To give you an example of the problem, here are some basic classes with their list of properties.<br>
  Type must be one of text, audio, or video.<br>
  Text - Name, Type, Description, Length, Author<br>
  Audio - Name, Type, Description, Length, FileFormat, Track #, Artist, Album, etc<br>
  Video - Name, Type, Description, Length, FileFormat, Track #, Artist, etc.  </p>
  
  <p>As you can see, the fields are slightly different for each.  When a Type is selected, it alters the available properties for user input.  Don't get too hung up on the classes and the approach, because the classes are just an example.  The user is requesting the data be in a grid-like format for readability.  With most of the user's data, only one or two pieces of information will change between entries in the DataGrid, so the ability to scan and find a change in a property is important.</p>
  
  <p>What is the best approach for the WPF design of this?<br>
  Can different items be cast into a single datagrid-like control?<br>
  Will I be able to cast the Generic Item to a Specific Item once the Type is selected?</p>