I have this SurfaceListBox:
<my:SurfaceListBox Margin="10" x:Name="grid1" VirtualizingStackPanel.IsVirtualizing="True" Style="{DynamicResource SurfaceListBoxStyle1}" ItemContainerStyle="{DynamicResource SurfaceListBoxItemStyle1}" VirtualizingStackPanel.VirtualizationMode="Standard" VirtualizingPanel.ScrollUnit="Pixel" my:SurfaceScrollViewer.CanContentScroll="True">
which I add like items several UserControl. Theese UserControl in their Loaded methods loads many TextBlock that change their position after an UserControl maximize.
The problem is when I maximize and minimize many times it shows the following error:
"Layout measurement override of element 'System.Windows.Controls.TextBlock' should not return PositiveInfinity as its DesiredSize, even if Infinity is passed in as available size."
Somebody knows how resolve it? Thanks.