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
20
XamGrid - way to shrink the margins around the headers/group by rows
posted

It looks like there is white space around the text displayed in the header and group by rows.  Is there a way to remove this space in order to compress the data as much as possible?

I tried to use a style and set the padding, but had no luck.  I'm not sure if the problem was with my code or that was the wrong approach to take.  I either had a compile error (when target type was set to HeaderCellControl or no obvious change to the display (when target type was set to CellControl).

This is something like I tried:

 

 

 

 

 

 

 

 

<Style x:Key="xy" TargetType="ig:CellControl">

<Setter Property="Padding" Value="2,2,2,2" />

 

 

 

 

<Setter Property="Background" Value="Yellow" />

 

 

 

 

<Setter Property="Height" Value="100" />

 

 

 

 

</Style>

 

 

 

<ig:XamGrid Grid.Column="0" HeaderStyle="{StaticResource xy}">

Is this the correct approach?  If so, can you see what I have wrong, or if not can you explain how this should be handled?

  • 40030
    Offline posted

    Hi, 

    The TargetType of the style should be HeaderCellControl which is in the primitives namespace:

    xmlns:igPrim="http://schemas.infragistics.com/xaml/primitives"

    <Style TargetType="igPrim:HeaderCellControl">

                <Setter Property="Padding" Value="0"/>

            </Style>

    Hope this helps, 

    -SteveZ