I am evaluating the WPF trial and came accross this issue that throws a runtime exception when I place a DX GridControl in a normal stackpanel. After throwing the exception it does not render.
I created a new WPF Browser Application project (Xbap), added one of the DX grids to the page, and put it in a stackpanel. See below for the source and exception:
Steps to Reproduce:
Here is my Page1.xaml source; the grid works when I take it out of the stackpanel.
<Page x:Class="WpfBrowserApplicationTesting.Page1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
Title="Page1" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
<Grid Margin="50,0,0,0">
<StackPanel>
<dxg:GridControl HorizontalAlignment="Left" Margin="10,10,0,0" Name="gridControl1" VerticalAlignment="Top">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Column1" />
<dxg:GridColumn FieldName="Column2" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView />
</dxg:GridControl.View>
</dxg:GridControl>
</StackPanel>
</Grid>
</Page>
Actual Results:
This is the runtime exception I receive:
"The constructor to deserialize an object of type 'DevExpress.Xpf.Grid.InfiniteGridSizeException' was not found.".
We have closed this ticket because another page addresses its subject:
No MaxHeight throws endless exception
Hello,
Thank you for the report. I belive we have already answered a similar question. Please review the following thread: No MaxHeight throws endless exception. Let me know if you need further assistance.
Thank you, Marina
That appears to be the same issue so I will mark as closed. However the workarounds feel like hacks; the grid's default behavior will crash the application if the developer doesn't manually specify a maximum height or that it's okay to have "infinite" rows, even if the application will never enough rows to cause a performance issue in the first place.