Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
695
ComboBox in EditorTemplate does not get custom style
posted

I am using xamGrid version 2010.3 and  I have overridden my default combobox style and put it in a resource called DefaultStyles.xaml that is referenced through app.xaml (as is XamGrid.xaml). The style is picked up in the ItemTemplate but not in the EditorTemplate. I have tried both putting not style attribute - to pick up the default and specifying a style attribute, both having the same result (it works in the ItemTemplate but not in the EditorTemplate).

See below for relevant code:

*** TemplateColumn xaml: ***

                <ig:TemplateColumn  Key="Label.DisplayValue" HeaderText="Label"  Width="150">

                    <ig:TemplateColumn.ItemTemplate>

                        <DataTemplate>

                            <ComboBox DisplayMemberPath="DisplayValue" Style="{StaticResource DefaultComboBoxStyle}"  SelectedItem="{Binding Label.DataValue, Converter={StaticResource valueConverter}, Mode=TwoWay, ConverterParameter={StaticResource phoneLabelProvider}}" ItemsSource="{Binding Source={StaticResource phoneLabelProvider}, Path=LookupItems}" />

                        </DataTemplate>

                    </ig:TemplateColumn.ItemTemplate>

                    <ig:TemplateColumn.EditorTemplate>

                        <DataTemplate>

                            <ComboBox DisplayMemberPath="DisplayValue"  Style="{StaticResource DefaultComboBoxStyle}" SelectedItem="{Binding Label.DataValue, Converter={StaticResource valueConverter}, Mode=TwoWay, ConverterParameter={StaticResource phoneLabelProvider}}" ItemsSource="{Binding Source={StaticResource phoneLabelProvider}, Path=LookupItems}" />

                        </DataTemplate>

                    </ig:TemplateColumn.EditorTemplate>

                </ig:TemplateColumn>

 

*** App.xaml Contents: ***

        <!-- Global Resources-->

        <ResourceDictionary x:Key="Default">

            <ResourceDictionary.MergedDictionaries>

 

                <!-- Styles -->

                <ResourceDictionary Source="Resources/XamGrid.xaml" />

                <ResourceDictionary Source="Resources/Styles.xaml" />

                <ResourceDictionary Source="Resources/DefaultStyles.xaml" />

                <ResourceDictionary Source="Resources/Toolkit.xaml" />

 

                <!-- Brushes and Colors-->

                <ResourceDictionary Source="Resources/Brushes.xaml" />

                <ResourceDictionary Source="Resources/Colors.xaml" />

 

                <!-- Data Templates-->

                <ResourceDictionary Source="Resources/ControlDataTemplates.xaml" />

 

                <!-- Other Resources -->

                <ResourceDictionary>

                    <core:RegionNames x:Key="RegionNames" />

                </ResourceDictionary>

            </ResourceDictionary.MergedDictionaries>

        </ResourceDictionary>