Hey all,
I was just coding up a WPF storm and I realized how much I was casting selected items in listboxes, comboboxes, etc.
Wouldn't it have made sense to make ItemsControl generic, so that you could declare a combobox as ComboBox<Users>, and then the items and selected items would be strongly typed? If you wanted to store "anything" then you could easily just do ComboBox<object>, but from my experience, 95% of the time an ItemsControl always binds to 1 type of object or several with a common base class.
Thoughts?
I was just coding up a WPF storm and I realized how much I was casting selected items in listboxes, comboboxes, etc.
Wouldn't it have made sense to make ItemsControl generic, so that you could declare a combobox as ComboBox<Users>, and then the items and selected items would be strongly typed? If you wanted to store "anything" then you could easily just do ComboBox<object>, but from my experience, 95% of the time an ItemsControl always binds to 1 type of object or several with a common base class.
Thoughts?