I want to change the content of the data grid column definition based on state in the ViewModel or based on the data bound to the DataGrid.
How do I do this via templates and template selectors? I want to write xaml and not code in order to do this.
Ex: there are two subclasses A and B that have 5 common columns and 5 completely different columns. Sometimes the grid will show a list of objects with type A , and sometimes B. They won't be mixed.
Short of having all the columns defined and disabling a subset of them using Style Triggers at the column level, I don't know how to do this in XAML alone.