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>
</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>
Hi,
There was a bug in this a while back, fixed around March, where we were applying a style to the Root control, , even if it there wasn't style set. By doing that, Implicit styling would work, and we were overriding the set style.
If you get the latest SR it shouldn't be an issue.
If for some reason that isn't possible, you can always set the EditorStyle property on the column instead.
-SteveZ
Hi Steve,
I mentioned what version we were on hoping you'd fixed the issue. We'll upgrade to 2011.1 soon.
thanks,
-greg