Look at the Infragistics example code in https://www.facebook.com/notes/infragistics/xamdatagrid-101-part-2/459278651408
When you build and run this there is a white border in the header (left and right sides), SNOOP the header and you will see a WhiteInnerBorder.
How to set this color? From you example above I think it should be in the style:
<Style x:Key="HeaderLabelAreaStyle" TargetType="{x:Type igDP:HeaderLabelArea}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igDP:HeaderLabelArea"> <Grid Background="{DynamicResource HeaderBackgroundBrush}" Margin="0,0,0,0"> <ContentPresenter Margin="0,0,0,0" Content="{TemplateBinding Content}" /> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>
I thought the whole point of the InnerBorderBrush property was to set this border color. This is a bug and should be fixed.
Hello Florin,
Another thing yo ucan do is to create a Style for the LabelPresenter and define an EventSetter for its Loaded event like this:
<Style TargetType="{x:Type igDP:LabelPresenter}" > <EventSetter Event="Loaded" Handler="LabelPresenter_Loaded"/></Style>
In the handler you can get the Border and set its Visibility Property to Collapsed like this:
private void LabelPresenter_Loaded(object sender, RoutedEventArgs e){ Border b = Utilities.GetDescendantFromName(sender as DependencyObject, "WhiteInnerBorder") as Border; b.Visibility = Visibility.Collapsed;}
OMG, I have to add 600 rows of XAML to get read of 1px of white?
Can I hide it?
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well. As for the "WhiteInnerBorder", I can say that this an element(Border) in the LabelPresenter's Template.
Thanks again.
This solution works perfectly. Thanks!
Just curious, is WhiteInnerBorder a Infragistics artefact or Microsoft's?