While developing WPF applications, you will notice a lot of binding errors being displayed in output window; like this
I am working on some refactoring kind of tasks and thought to share some of my findings with you all. In one of the application I am working, lot of converters were used for determining the value of a property based on various conditions (values of other properties); It’s not required to use these converters at all and these can easily be replaced with Triggers. I don’t have any statistics in favor of triggers at present but some problems I see in using converters are –
For creating dynamic sub-menus, <MenuItem.ItemContainerStyle> must be used instead of using <MenuItem.ItemTemtplae>; Try to avoid using ItemTemplate , specially a MenuItem should not be used inside an ItemTemplate as it creates two menu items for a sub-menu.