Hi,
I try to define different labelpresenter styles between Xamdatagrid and FieldChooser.
I definde those two styles:
<Style TargetType="{x:Type igDP:LabelPresenter}"> <Setter Property="Background" Value="#FF000000"/> <Setter Property="Foreground" Value="#FFFFFFFF"/> <Setter Property="LabelHighlight" Value="{StaticResource LabelHLight}"/> <Setter Property="FontFamily" Value="Calibri"/> <Setter Property="FontSize" Value="14"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> </Style> <Style x:Key="forFieldChooser" TargetType="{x:Type igDP:LabelPresenter}"> <Setter Property="Background" Value="#FFFFFFFF"/> <Setter Property="Foreground" Value="#FF000000"/> <Setter Property="LabelHighlight" Value="{StaticResource LabelHLight}"/> <Setter Property="FontFamily" Value="Calibri"/> <Setter Property="FontSize" Value="14"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> </Style>
I did not find how to apply the second one to the fieldchooser so i tried to define it as default (by removing the keyword "x:key=forFieldChooser"), and renamed the first one "forHeader" then I applied it to my datagridthis way:
<igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings LabelPresenterStyle={DynamicResource forHeader}/></igDP:XamDataGrid.FieldSettings>
It worked fine for the headr but the fieldchooser also took this style instead of default.
Is there anyway to use different styles between Fieldchooser and Datagrid's headers?
Thanks, it works fine!
Hello Lionel,
I have been looking into and can suggest you look through the “Field Chooser Styling” sample ion the Feature Browser. It show how you can achieve this.
Please let me know if you require any further assistance on the matter. If not please verify the thread as answered so it helps other users as well. Thanks in advance.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support