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>
Interestingly, the ComboBoxItem does get the correct style, just not the ComboBox.
Also, setting the style directly on the combobox in that view doesn't work either: I tried the following.
>
<ComboBox.Style>
/>
<Setter.Value>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Grid>
<Grid.Resources>
<vsm:VisualStateManager.VisualStateGroups>
</vsm:VisualState>
<Storyboard>
</Storyboard>
</vsm:VisualStateGroup>
<DiscreteObjectKeyFrame.Value>
</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</vsm:VisualStateManager.VisualStateGroups>
"1"
></Rectangle>
</Grid>
</Border>
"0"
<ContentPresenter
"contentPresenter"
"
</ControlTemplate>
</Style>
</Grid.Resources>
</sys:Boolean>
<Path.Fill>
</Path.Fill>
</Path>
</ToggleButton>
</ContentPresenter>
<ToolTipService.ToolTip>
<ToolTip.Triggers>
<EventTrigger.Actions>
<BeginStoryboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</ToolTip.Triggers>
</ToolTip>
</ToolTipService.ToolTip>
<Border.Background>
</Border.Background>
<ItemsPresenter/>
</ScrollViewer>
</Popup>
</ComboBox.Style>
</ComboBox>