Determine what caused LayoutUpdate / ArrangeOverride?

I have a custom panel that, when resized, has the LayoutUpdated and ArrangeOverride events twice.

So, first MeasureOverride and ArrangeOverride do their job once when opening the client window. Then, if I maximize the window, each one is called twice. Available and final sizes, respectively, do not differ between each iteration, so I'm not sure what this beginning is.

Is there a way to determine the reason for the invalidity?

+5
source share
3 answers

I think it is called twice because the height and width change. I think both of these properties affect Measure, and so there is a layout pass for each of them.

+6

?

DependencyProperty, FrameworkPropertyMetadataOptions AffectsMeasure/AffectsOverride.

- , .

, .

+3

, - . , , .

0

All Articles