Design Time Exception

Sep 12, 2012 at 3:53 PM
Edited Sep 12, 2012 at 3:58 PM

This exception occurs at design time:

 

System.InvalidOperationException
Layout measurement override of element 'Controls.VirtualizingWrapPanel' should not return PositiveInfinity as its DesiredSize, even if Infinity is passed in as available size.
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)

 

My control has not really defined size (RowDefinition Height="Auto"), but if it works with the other panels, should work with this, right?

 

                <ListBox SelectionMode="Single" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <control:VirtualizingWrapPanel />
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                </ListBox>

 

(off) A propósito ótimo trabalho aqui, um salve para nós desenvolvedores brasileiros que utilizam WPF.