WPF - WrapPanel Virtualization

Does anyone have a workable WrapPanel virtualization that I can use in a WPF application?

I downloaded and tried the implementation at http://virtualwrappanel.codeplex.com/ . However, I get the following exception:

"Finishing replacing the layout of the MyNamespace.VirtualizingWrapPanel element should not return PositiveInfinity as DesiredSize, even if Infinity is passed as the available size."

This is when trying to apply a wrapper to a ListBox

+3
source share
2 answers

, , . MeasureOverride. , availableSize, . availableSize, double.PositiveInfinity. :

if(availableSize.Width == double.PositiveInfinity || availableSize.Height == double.PositiveInfinity)
{
    return Size.Empty;
}

// all the measureoverride code comes here

return availableSize;

. , , MeasureOverride ArrangeOverride ( , ).

+6

, - , , , . , .

Microsoft , . , , , ... .

, , , , .

+5

Source: https://habr.com/ru/post/1765321/


All Articles