I set the data template for the combobox element, which is used in my RCTComboBox class, and it works fine at runtime, but when a developer in another assembly issues a warning and cannot show its contents. The warning is that it cannot see the name label
inside the data template. The custom combobox class is displayed fine, but the combobox items are not displayed. Is there a way to prevent this problem so that it is easier to use the control?
<ControlTemplate TargetType="{x:Type ComboBoxItem}">
<ControlTemplate.Resources>
<DataTemplate DataType="{x:Type sys:String}">
<local:RCTLabel x:Name="label" VerticalOffset="-1" Height="10" Text="{Binding Mode=OneWay}"/>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ComboBoxItem}}, Path=IsHighlighted}" Value="True">
<Setter Property="UseRemapColor" TargetName="label" Value="True"/>
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</ControlTemplate.Resources>
Received warning in another assembly

: , contenttemplate comboBoxitem comboBox. ?
<Style.Resources>
<Style TargetType="ComboBoxItem" BasedOn="{StaticResource RCTComboBoxItemStyle}"/>
</Style.Resources>