Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Error of Layout WPF

$
0
0

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.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>