I've created a small application with a View and ViewModel.
In the view a PropertyGrid is used it edit the properties from the ViewModel based on data annotations.
The ViewModel contains two properties:
“SelectedBrand” - the currently selected brand
“Brands” - a list of all available brands.
The PropertyGrid should provide a ComboBox to edit the “SelectedBrand” and should hide the “Brands”.
So I’ve annotated “Brands” with a “Browsable(false)” and “SelectedBrand” with a “Editor(typeof(RadComboBox))” attribute.
This works so far quite well.
Now here’s the catch: How do I tell the editor, that the “Brands” should be used as ItemsSource for the ComboBox ?
Right now the combo box is just empty.
Thanksin advance
In the view a PropertyGrid is used it edit the properties from the ViewModel based on data annotations.
The ViewModel contains two properties:
“SelectedBrand” - the currently selected brand
“Brands” - a list of all available brands.
The PropertyGrid should provide a ComboBox to edit the “SelectedBrand” and should hide the “Brands”.
So I’ve annotated “Brands” with a “Browsable(false)” and “SelectedBrand” with a “Editor(typeof(RadComboBox))” attribute.
This works so far quite well.
Now here’s the catch: How do I tell the editor, that the “Brands” should be used as ItemsSource for the ComboBox ?
Right now the combo box is just empty.
Thanksin advance