- applyRounding
- validateFinalRect
- validateVisibility
- checkNeedArrange
- ensureMeasured (*)
- invalidateFuture
- calcStretched
- prepareOverride
- doOverride
- Assign
arrangedSizebased on compilation of childarrangedSize.
- Assign
- completeOverride
- calcFlip
- calcVisualOffset
- buildLayoutClip
- buildLayoutXform
- buildRenderSize
- Set
lasttoLayoutSlot - If no visual parent, set
lasttoviewport- If layout container
- If top level and attached, set
viewporttoPreviousConstraintfall back to surface size
- If top level and attached, set
- Else set
viewporttoActualSize - Move
viewportbyCanvas.LeftandCanvas.Top
- If layout container
- If
last, [#_Arrange] - Else
InvalidateArrangeon visual parent
- If
UseLayoutRounding, roundfinalRect - Sanity checks
- Validate
finalRectis not negative/NaN/infinite - If
Collapsed, setLayoutSlottofinalRect, skip out - If does not have dirty arrange and
LayoutSlotequalsnullorfinalRect: skip out
- Validate
- Prepare
- If
IsContainerand noPreviousConstraint: setPreviousConstraintto [#_Measure] with size fromfinalRect - Clear LayoutClip
- If
- Invalidate
UpdateTransformUpdateProjectionUpdateBounds
- Framework Coercion
- Shrink
finalRectbyMarginaschildRect - Coerce size from
childRecttostretched - Coerce size from blank size to
framework - If stretched horizontally/vertically set
frameworkto max offramework/stretched - Set
offerto max ofHiddenDesireandframework - Set
LayoutSlottofinalRect
- Shrink
- [#ArrangeOverride] ->
response - Post Arrange Coercion
- If stretched horizontally/vertically, set
responseto max offramework/response - Set
LayoutXformto translate(childRecttop-left) - If flip horizontal (
FlowDirection), flipLayoutXformbased onofferWidth
- If stretched horizontally/vertically, set
- Clear dirty flags
- Set
VisualOffsettochildRecttop-left - Copy
RenderSize(old) tooldSize - If
UseLayoutRounding, roundresponse - Set
RenderSizetoresponse - Set
constrainedResponseto min ofresponseand coercedresponse - If no visual parent or visual parent is
Canvasand notIsLayoutContainer: clearRenderSize, skip out - If not top level, adjust
VisualOffsetbased onchildRect,constrainedResponse,HorizontalAlignment, andVerticalAlignment - If
UseLayoutRounding, roundVisualOffset - Build
LayoutXformbased onVisualOffsetandflipHoriz - Build
LayoutClip- Set
layoutCliptochildRect - Set
layoutCliptop-left to min ofchildRecttop-left andvisualOffsettop-left (x,y can't be negative) - If
UseLayoutRounding, roundlayoutClip - Set
frectto coerced size infinity,infinity with 0,0 top-left - Set
LayoutClipto intersection oflayoutClipandfrect
- Set
- If
oldSizenot equal toresponseand noLastRenderSize, setLastRenderSizetooldSizeand propagateDirtySizeHint
- Control-specific layout
- Falls into children [#_Arrange]