Hi,I modify IG theme for xamlPivotGrid.How can I delete margin between columns headers (Mypicture.jpg yellow color)?Or these spaces can not be removed.
Thanks,Jaroslavas
Hi
Could you post your ColumnHeaderCellControl style. I guess the problem is in ControlTemplate you have applied.
Todor
<Style TargetType="igPivot:PivotHeaderCellControl" x:Key="HeaderCellKey"> <Setter Property="FontSize" Value="{StaticResource DataSize}" /> <Setter Property="Background" Value="{StaticResource HeaderNormalBackgroundBrush}" /> <Setter Property="Foreground" Value="{StaticResource LightForegroundColor}"/> <Setter Property="BorderBrush" Value="{StaticResource HeaderNormalBorderBrush}"/> <Setter Property="BorderThickness" Value="0,0,1,1"/> <Setter Property="HorizontalContentAlignment" Value="Right"/> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="Padding" Value="5 0 5 0" /> </Style>
<Style TargetType="igPivot:PivotColumnHeaderCellControl" BasedOn="{StaticResource HeaderCellKey}"> <Setter Property="Height" Value="Auto" /> <Setter Property="Width" Value="Auto" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="igPivot:PivotColumnHeaderCellControl"> <Border BorderBrush="Red" BorderThickness="2" VerticalAlignment="Top"> <TextBlock Text="Tra lia lia" Foreground="Black" Margin="0" Padding="0" /> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style>
Change VerticalAlignment of border to stretch. Now it is Top
<ControlTemplate TargetType="igPivot:PivotColumnHeaderCellControl"> <Border BorderBrush="Red" BorderThickness="2" VerticalAlignment="Stretch"> <TextBlock Text="Tra lia lia" Foreground="Black" Margin="0" Padding="0" /> </Border> </ControlTemplate>
Thanks, it works :)
Jaroslavas
You are right. I saw that the MinHeight of the column header cell is set to 25 by default style, so if you override this value you will achive the goal you want.
<Style TargetType="igPivot:PivotColumnHeaderCellControl" BasedOn="{StaticResource HeaderCellKey}" x:Key="ColumnStyle"> <Setter Property="MinHeight" Value="1" />
Yes, it works.But I want to do PivotColumnHeaderCell more compact (reduce the column heights).Make similar as PivotRowHeaderCell in my picture.Is there a way to do it?