I have a ViewModel that has among others the following properties (not showing any MVVM related code):
class MyVM {
string Name { get; set; }
Type Type { get; set; }
object Value { get; set; }
}
Basically, it's like the "Properties" window in Visual Studio. I have the name or the property, the type it can accept (either int, float, string or list) and the actual value. I want to show those in a DataGrid. The Value column should create cells based on the Type property, i.e. a text field if the type is string, a text field only accepting int if the type is int, etc. I only see solutions where the type is changed for an entire column but not on a cell-by-cell basis. How do I do this?