I have a control derived from ComboBox, i want to use the ComboBox ControlTemplate, and just set a few values on it in xaml, namely the ItemContainerStyle. The code below doesnt work, the last setter, which im intending to apply the base ComboBox control template to this one, doesnt do anything.
<Style
TargetType="{x:Type local:EditingFilteringComboBox}"
BasedOn="{StaticResource {x:Type ComboBox}}">
<Setter
Property="IsEditable"
Value="False" />
<Setter
Property="DisplayMemberPath"
Value="DisplayValue" />
<Setter
Property="ItemContainerStyle"
Value="{StaticResource editingFilteringComboBoxListBoxItem}" />
<Setter
Property="Template"
Value="{StaticResource {x:Type ComboBox}}" />
</Style>
I want to derive from combo box but i dont want to include the whole control template for it. I dont even want to touch the control template. I do want to change the ItemContainerStyle, which i could do from code, but much nicer if i dont have to.
the other reason why i want this here is because to want access to the internal members of the ComboBox's control template, namely the TextBox and the Popup. Usually i access members like this in the override of OnApplyTemplate.
i feel like im travelling the wrong path, enlighten me sensei.