Trying to load a very long list to WPF DataGrid
I have a very large xml file, 4,677 KB - basically around 26000 lines, each looking like:

    <samples>
	<sample id=1 field =test field1=test1 field2=test2 field3=""test3"" field4=""test4"" field5=""test5"" field6=""test6"" field7=""test7""  field8=""test8"" field9=""test9"" field10=""test10""   />
	<sample id=""2"" field =""test"" field1=""test1"" field2=""test2"" field3=""test3"" field4=""test4"" field5=""test5"" field6=""test6"" field7=""test7""  field8=""test8"" field9=""test9"" field10=""test10""   />
	<sample id=""3"" field =""test"" field1=""test1"" field2=""test2"" field3=""test3"" field4=""test4"" field5=""test5"" field6=""test6"" field7=""test7""  field8=""test8"" field9=""test9"" field10=""test10""   />
...
</samples>

and I'm trying to load this into a WPF DataGrid using a DataSet/DataView. Sure enough, OutOfMemoryException was fired when trying to bind to this as so:

            <Grid x:Name="LayoutRoot">
            <HeaderedContentControl Header="Sample Data">
            <DataGrid
                    x:Name="DataGrid"
                    AutoGenerateColumns="True"
                    ItemsSource="{Binding Path=GridData, Mode=OneWay}">
                </DataGrid>
            </HeaderedContentControl>
        </Grid>

I tried adding the VirtualizingStackPanel.IsVirtualizing="True" (although that's the default) and also VirtualizingStackPanel.VirtualizationMode="Recycling", but it didn't help.

I know this is tons of data for the control, I'm wondering what my options are.
Trying to load a very long list to WPF DataGrid
===

I have a very large xml file, 4,677 KB - basically around 26000 lines, each looking like:

    <samples>
	<sample id=1 field =test field1=test1 field2=test2 field3=""test3"" field4=""test4"" field5=""test5"" field6=""test6"" field7=""test7""  field8=""test8"" field9=""test9"" field10=""test10""   />
	<sample id=""2"" field =""test"" field1=""test1"" field2=""test2"" field3=""test3"" field4=""test4"" field5=""test5"" field6=""test6"" field7=""test7""  field8=""test8"" field9=""test9"" field10=""test10""   />
	<sample id=""3"" field =""test"" field1=""test1"" field2=""test2"" field3=""test3"" field4=""test4"" field5=""test5"" field6=""test6"" field7=""test7""  field8=""test8"" field9=""test9"" field10=""test10""   />
...
</samples>

and I'm trying to load this into a WPF DataGrid using a DataSet/DataView. Sure enough, OutOfMemoryException was fired when trying to bind to this as so:

            <Grid x:Name="LayoutRoot">
            <HeaderedContentControl Header="Sample Data">
            <DataGrid
                    x:Name="DataGrid"
                    AutoGenerateColumns="True"
                    ItemsSource="{Binding Path=GridData, Mode=OneWay}">
                </DataGrid>
            </HeaderedContentControl>
        </Grid>

I tried adding the VirtualizingStackPanel.IsVirtualizing="True" (although that's the default) and also VirtualizingStackPanel.VirtualizationMode="Recycling", but it didn't help.

I know this is tons of data for the control, I'm wondering what my options are.