- applyRounding
- validateFinalRect
- validateVisibility
- checkNeedArrange
- ensureMeasured (*)
- invalidateFuture
- calcStretched
- prepareOverride
- doOverride
- Assign
arrangedSize
based on compilation of childarrangedSize
.
- Assign
- completeOverride
- calcFlip
- calcVisualOffset
- buildLayoutClip
- buildLayoutXform
- buildRenderSize
- Set
last
toLayoutSlot
- If no visual parent, set
last
toviewport
- If layout container
- If top level and attached, set
viewport
toPreviousConstraint
fall back to surface size
- If top level and attached, set
- Else set
viewport
toActualSize
- Move
viewport
byCanvas.Left
andCanvas.Top
- If layout container
- If
last
, [#_Arrange] - Else
InvalidateArrange
on visual parent
- If
UseLayoutRounding
, roundfinalRect
- Sanity checks
- Validate
finalRect
is not negative/NaN/infinite - If
Collapsed
, setLayoutSlot
tofinalRect
, skip out - If does not have dirty arrange and
LayoutSlot
equalsnull
orfinalRect
: skip out
- Validate
- Prepare
- If
IsContainer
and noPreviousConstraint
: setPreviousConstraint
to [#_Measure] with size fromfinalRect
- Clear LayoutClip
- If
- Invalidate
UpdateTransform
UpdateProjection
UpdateBounds
- Framework Coercion
- Shrink
finalRect
byMargin
aschildRect
- Coerce size from
childRect
tostretched
- Coerce size from blank size to
framework
- If stretched horizontally/vertically set
framework
to max offramework
/stretched
- Set
offer
to max ofHiddenDesire
andframework
- Set
LayoutSlot
tofinalRect
- Shrink
- [#ArrangeOverride] ->
response
- Post Arrange Coercion
- If stretched horizontally/vertically, set
response
to max offramework
/response
- Set
LayoutXform
to translate(childRect
top-left) - If flip horizontal (
FlowDirection
), flipLayoutXform
based onoffer
Width
- If stretched horizontally/vertically, set
- Clear dirty flags
- Set
VisualOffset
tochildRect
top-left - Copy
RenderSize
(old) tooldSize
- If
UseLayoutRounding
, roundresponse
- Set
RenderSize
toresponse
- Set
constrainedResponse
to min ofresponse
and coercedresponse
- If no visual parent or visual parent is
Canvas
and notIsLayoutContainer
: clearRenderSize
, skip out - If not top level, adjust
VisualOffset
based onchildRect
,constrainedResponse
,HorizontalAlignment
, andVerticalAlignment
- If
UseLayoutRounding
, roundVisualOffset
- Build
LayoutXform
based onVisualOffset
andflipHoriz
- Build
LayoutClip
- Set
layoutClip
tochildRect
- Set
layoutClip
top-left to min ofchildRect
top-left andvisualOffset
top-left (x,y can't be negative) - If
UseLayoutRounding
, roundlayoutClip
- Set
frect
to coerced size infinity,infinity with 0,0 top-left - Set
LayoutClip
to intersection oflayoutClip
andfrect
- Set
- If
oldSize
not equal toresponse
and noLastRenderSize
, setLastRenderSize
tooldSize
and propagateDirtySizeHint
- Control-specific layout
- Falls into children [#_Arrange]