views:

61

answers:

1

i need to bind a collection of objects to a combo box which i can use in different forms. so i want create a custom control which binds the collection to the combo box? how t do it by extending combo box? also how can i define the ItemData template?

+1  A: 

Why do you want to extend ComboBox? You can directly bind ComboBox to a collection using ItemsSource property! This and this page explains more about data binding and using ItemTemplate with ComboBox. Or, you can explore more on MSDN.

Mihir Gokani
+1, Shaihan, I think you should check out WPF Unleashed by Adam Nathan; it's a very good book on this topic
Paul Betts