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
1210
XamDataGrid Column Header Height
posted

Hi Guys,

 

I have a problem with XamDataGrid column header height, in one of my controls it seems to be much higher than usual and i can't seem to be able to control it.

Can you think on anything that might cause this? This is really annoying... Is there a way to control the height of the column header? I'd like it to stay just as is but just change the height.

In this code:

        <dp:XamDataGrid Name="dataGrid" DataSource="{Binding Children}" MouseMove="XamDataGrid_MouseMove" MouseDoubleClick="XamDataGrid_MouseDoubleClick" SelectedItemsChanged="XamDataGrid_SelectedItemsChanged"
                        ContextMenu="{Binding Converter={StaticResource ContextMenuConverter}}" Theme="{Binding Theme}"
                        GroupByAreaLocation="None" AutoFit="True" HorizontalAlignment="Stretch"
                        BorderThickness="1,0,1,1" BorderBrush="{StaticResource DefaultBorderBrush}">
            <dp:XamDataGrid.FieldLayoutSettings>
                <dp:FieldLayoutSettings AutoGenerateFields="False" AllowAddNew="False" AllowDelete="False" AllowFieldMoving="No" SelectionTypeCell="None" />
            </dp:XamDataGrid.FieldLayoutSettings>
            <dp:XamDataGrid.FieldLayouts>
                <dp:FieldLayout x:Name="fieldLayout">
                    <dp:Field Name="C1"/>
                    <dp:Field Name="C2"       />
                    <dp:Field Name="C3"      />
                    <dp:Field Name="C4"   />
                    <dp:Field Name="C5"    />
                </dp:FieldLayout>
            </dp:XamDataGrid.FieldLayouts>

        </dp:XamDataGrid>

The column header is too high, while in this code it is just fine:

                        <my:XamDataGrid Grid.Row="7" Margin="5,0,10,0" Grid.Column="0" Grid.ColumnSpan="3" DataSource="{Binding Path=LineItemVersionAttributes}" IsNestedDataDisplayEnabled="False" AutoFit="True" GroupByAreaLocation="None" HorizontalAlignment="Stretch" Theme="Office2k7Silver">
                            <my:XamDataGrid.FieldLayoutSettings>
                                <my:FieldLayoutSettings AllowAddNew="False" AllowDelete="False" AllowFieldMoving="No"/>
                            </my:XamDataGrid.FieldLayoutSettings>
                            <my:XamDataGrid.FieldLayouts>
                                <my:FieldLayout>
                                    <my:Field Name="Name" Visibility="Visible" Width="150"/>
                                    <my:Field Name="Value" Visibility="Visible" Width="120"/>
                                    <my:Field Name="Units" Visibility="Visible" Width="120"/>
                                    <my:Field Name="Description" Visibility="Visible" Width="*"/>
                                </my:FieldLayout>
                            </my:XamDataGrid.FieldLayouts>
                            <my:XamDataGrid.FieldSettings>
                                <my:FieldSettings AllowEdit="False" AllowRecordFiltering="True" ExpandableFieldRecordExpansionMode="ExpandAlways"/>
                            </my:XamDataGrid.FieldSettings>
                        </my:XamDataGrid>

What am i doing wrong here? Pls help....

 

Thanx,

Gili