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
340
Theme not working when aplying styles
posted

Hi,

I have the following grid:

 <igDP:XamDataGrid Grid.Row="1" DataSource="{Binding LoadedEvents}"
                                  behaviors:XamGridSelectionChanged.SelectionChangedCommand="{Binding SelectionChangedCommand}"
                                  Theme="Office2k7Black" RecordActivating="XamDataGrid_RecordActivating">
                    <igDP:XamDataGrid.FieldSettings>
                        <igDP:FieldSettings AllowRecordFiltering="true"/>
                    </igDP:XamDataGrid.FieldSettings>
                    <igDP:XamDataGrid.FieldLayoutSettings>
                        <igDP:FieldLayoutSettings  AutoGenerateFields="False" FilterUIType="FilterRecord"/>
                    </igDP:XamDataGrid.FieldLayoutSettings>                   
                    <igDP:XamDataGrid.FieldLayouts>
                        <igDP:FieldLayout>
                            <igDP:FieldLayout.Fields>
                                ...
                            </igDP:FieldLayout.Fields>
                        </igDP:FieldLayout>
                    </igDP:XamDataGrid.FieldLayouts>
                    <igDP:XamDataGrid.Resources>
                        <Style TargetType="{x:Type igDP:DataRecordCellArea}">
                            <Setter Property="OverridesDefaultStyle" Value="False"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record.DataItem.BasketEventStatusString}" Value="None">
                                    <Setter Property="Background" Value="#FFE4EBF2" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record.DataItem.BasketEventStatusString}" Value="AlmostExDate">
                                    <Setter Property="Background" Value="#FFF9EFA9" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record.DataItem.BasketEventStatusString}" Value="ExDateOrLater">
                                    <Setter Property="Background" Value="#FFF5D7D7" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record.DataItem.BasketEventStatusString}" Value="SignedOff">
                                    <Setter Property="Background" Value="#FFD4F5D4" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record.DataItem.BasketEventStatusString}" Value="Complete">
                                    <Setter Property="Background" Value="#FFD4F5D4" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </igDP:XamDataGrid.Resources>

The thing is that with these styles in the Resources of the grid the theme looks like not being applied, is there any solution for this? Also if I put the Styles outside the resources the theme is applyed but the styles are ignored.

Thanks,

Fede