WPF - Setting ComboBox.SelectedItem in XAML based on matching object?

You can databind SelectedItem on a combobox. If I understand your description you have a collection of hex strings and a SolidColorBrush property called Color. The below code updates Color property when selected item is changed.

I you are using the MVVM pattern, then add a property SelectedHexColor to your view model and let the view model search the correct solid color brush in your list from which the color brush combobox is being populated and update the SelectedBrush property of your view model to which the selected item of the combobox is bound.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions