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
Thanks, it works :)
Jaroslavas
Hi
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" />
Todor
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?
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>
<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>