Closed DrkWzrd closed 4 years ago
Hi,
as described in the API documentation all items (childs) must have the same size. If this can not be guaranteed by the items itself, you can set the ItemSize property.
The case that the items have different sizes is unfortunately not supported. The problem is that only the desired size of the realized items is known. Therefore, it is not possible to reliably calculate the maximum items size.
In
VirtualizingWrapPanel,UpdateChildSize
this fragment of codechildSize = InternalChildren[0].DesiredSize;
(line 114)makes fixed bigger size children not showing entirely.
It should be
var castChildren= InternalChildren.Cast<UIElement>();
var maxWidth = castChildren.Max(uielement=> uielement.DesiredSize.Width);
var maxHeight = castChildren.Max(uielement=> uielement.DesiredSize.Height);
childSize = new Size(maxWidth, maxHeight);