Thank you, I was struggling to figure out how to convert my Enum values to icons in my datagrid. With the help of this video I managed to write a IconConverter class that takes my enum value and converts it to a StreamGeometry instance. I can then pass this StreamGeometery instance along to my view to be used inside a element as the source for the Data attribute. Initially I wanted to use a Dynamic resource binding to bind StreamGeometery to a path but really couldn't figure out how make this work. PS: I'm using Avalonia instead of WPF, but it uses the same syntax so I didn't really need to change anything compared to your code :).
@@dotnetskoool5809 Thanks for the response. I got the problem resolved by removing *DateTime date = (DateTime)value;* so the *convert* code ended up like this: public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { DateTime date = DateTime.Today; return date.ToString("dd/MM/yyyy"); }