When binding a view model to a datagrid, property singularizing is not working properly for collection properties that end in "es".
I had a property called "Batches" to which the grid was bound. The grid correctly displayed the items in this _BindableCollection_.
However, the VM property __SelectedBatch__ was not bound to the grids selected item.
I changed the collection name to __Items__ and the selected item property to __SelectedItem__ and everything worked.
Caliburn Micro 1.5.2
WPF 4.5
Here is the offending code in ConventionManager:
>
public static Func<string, string> Singularize = original => {
return original.EndsWith("ies")
? original.TrimEnd('s').TrimEnd('e').TrimEnd('i') + "y"
: original.TrimEnd('s');
};
I had a property called "Batches" to which the grid was bound. The grid correctly displayed the items in this _BindableCollection_.
However, the VM property __SelectedBatch__ was not bound to the grids selected item.
I changed the collection name to __Items__ and the selected item property to __SelectedItem__ and everything worked.
Caliburn Micro 1.5.2
WPF 4.5
Here is the offending code in ConventionManager:
>
public static Func<string, string> Singularize = original => {
return original.EndsWith("ies")
? original.TrimEnd('s').TrimEnd('e').TrimEnd('i') + "y"
: original.TrimEnd('s');
};