title: WPF DataGrid how to set ColumnType to different type based on bound data?
body: <p>I have "Preferences" data structure where I have string "Value" field and enum for "Type" field.</p>
  
  <p>Type can be 0-Boolean, 1-Integer, 2-String ...</p>
  
  <p>Depending on value in this Type field I'd like to display "Value" cell different way Checkbox, Textbox, dropdown, etc. So, to make it clear - same column should display different cells depending on data in that row..</p>
  
  <p>I guess I need to employ DataGridTemplateColumn but I never did that and would like some example if possible. </p>
  
  <p>Also, what can I do with XAML and what needs to be done in Code? I guess Value converter will have to be used as well?</p>