WPF trim property value before binding
I have bound the datagrid Type column with the property called Vehile of the dataobject. The value of the property for example is InventoryService.Car, InventoryService.Boat etc. I need to display only Car or Boat and trim the remaining part that is InventoryService. How do I achieve that. My current code is as follows
Siddhartha SarkarPosted Apr 30, 2014, 7:12 AM
Here is what the converter would look like (I havent compiled it):
Declare it as static resource of your control/window:
And then you can use this in your xaml binding: