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
110
Simple XamDataGrid grows height when scrollbar clicked
posted

I must have something whacky going on, since this is such a simple example yet I haven't seen anyone raise this problem yet.

I have a simple XamDataGrid, bound to a source with three simple items.  Grid comes up fine, but if you click on the vertical down scroll, the control gets taller than the screen (easy to see if you have Window SizeToContent="WidthAndHeight").

<Window x:Class="WpfApplication2.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="SimpleXamDataGrid" SizeToContent="WidthAndHeight"
    xmlns:igDP="http://infragistics.com/DataPresenter">
        <StackPanel>
            <StackPanel.Resources>
                <XmlDataProvider x:Key="testData" XPath="Benefits">
                    <x:XData>
                        <Benefits xmlns="">
                            <Benefit>
                                <Description>Benefit1</Description>
                            </Benefit>
                            <Benefit>
                                <Description>Benefit2</Description>
                            </Benefit>
                            <Benefit>
                                <Description>Benefit3</Description>
                            </Benefit>
                        </Benefits>
                    </x:XData>
                </XmlDataProvider>
            </StackPanel.Resources>
            <igDP:XamDataGrid x:Name="xdg1"
            DataSource="{Binding Source={StaticResource testData}, XPath=Benefit}">
                <igDP:XamDataGrid.FieldLayoutSettings>
                    <igDP:FieldLayoutSettings AutoGenerateFields="False" />
                </igDP:XamDataGrid.FieldLayoutSettings>
                <igDP:XamDataGrid.FieldLayouts>
                    <igDP:FieldLayout>
                        <igDP:FieldLayout.Fields>
                            <igDP:Field Name="Description" Label="Benefit Description"/>
                        </igDP:FieldLayout.Fields>
                    </igDP:FieldLayout>
                </igDP:XamDataGrid.FieldLayouts>
            </igDP:XamDataGrid>
        </StackPanel>
    </Window>