Custom ComboBox control inside other custom ComboBox control, how to bind Items?

You could try using a RelativeSource binding.

You could try using a RelativeSource binding: As an aside, usual practice in WPF is to use Styles to alter visual aspects of controls, rather than creating derived types.

Thank you, that did the trick. I am using styles, but each ComboBox type contains extra DependencyProperties and since I'm fairly new at this creating my own custom controls based upon them was the easiest way to do it. – tyfius Jan 20 '10 at 14:58.

There's a second problem I'm experiencing with this. I styled the ItemContainerStyle property and set a SystemColors. When I use the BlueComboBox on its own this works perfectly when I hover over an item.

However, when I embed my BlueComboBox in my new control this doesn't work anymore when I use the ItemsSource template binding. When I directly add some ComboBoxItems in my control template to the BlueComboBox item it works again. It also works when I explicitly click on an item.

I tried setting the ItemContainerStyle property on my WhiteComboBox control template and passing it down, but none of the things I tried seems to do the trick.

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