question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When resizing FluidWrapPanel: InvalidOperationException: Measure Pass

See original GitHub issue

Hi,

I’m planning to use your excellent FluidWrapPanel as a Grid with a configurable layout of tiles. I wanted to update to the latest version as until now I was on CompositionProToolkit v. 0.7 Now, when I resize my MainWindow, at a certain size I get the following unhandled exception:

System.InvalidOperationException: Measure Pass: Unable to accommodate child in the panel!
   at CompositionProToolkit.Controls.FluidWrapPanel.MeasureOverride(Size availableSize)

Messing around with the set child sizes seems to influence the problem, but it does not really help. Also, sometimes when starting up the App, the children don’t get distributed but are stacked at the upper left corner. And when resizing the children sometimes are “fitting” into the grid (e.g. two in a row when using childcontrol.Width = Panel.Width / 2 ) and sometimes they don’t fit. Here’s a little repository for reproducing the problems:

https://github.com/jasonwurzel/FluidWrapProblem

Thank you for your help,

Michael

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ratishphilipcommented, Mar 12, 2018

Hi Michael,

Thanks for reporting this issue. Let me have a look. I shall get back to you.

Regards, Ratish

0reactions
ratishphilipcommented, Apr 18, 2018

Closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WrapPanel does not redraw on maximize
I am using wrappanel (WPF 4.5) inside ListView (itemspanel template). When I resize the window, wrappanel redraws itself correctly.
Read more >
How not to resize a datagrid or a wrappanel item?
Ideally I am looking for my wrappanel child to have a constant size, and my datagrid directly to present the scrollbar upon addition...
Read more >
Conceptual Children: A powerful new concept in WPF
This article describes a new approach by which an element can remove its visual and logical relationships to its children while maintaining ...
Read more >
Untitled
This article presents an extension to the WPF WrapPanel control that infers aesthetically pleasing ItemWidth and ItemHeight properties.
Read more >
WrapPanel Class (System.Windows.Controls)
Implements basic measure-pass layout system behavior for FrameworkElement. (Inherited from FrameworkElement). MeasureOverride(Size). Measures the child elements ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found