Skip to content

[NET10] Make VisualElement.ComputeConstraintForView and LayoutConstraint enum public #28897

@albyrock87

Description

@albyrock87

Description

Enable custom layouts to specify whether a given child is being constrained on a fixed size.

Public API Changes

Intended Use-Case

In MAUI it's super easy to build new custom layouts, and sometimes layout may constrain a given children on the horizontal or vertical axis, so that even when the measure of that child changes, there's no need to invalidate the entire hierarchy.

This could enable MAUI to highly reduce the number of layout passes.
A step in this direction has been made on #28479 and #28756, where on the latter we moved ComputeConstraintForView call to VisualElement measure invalidation.

Metadata

Metadata

Labels

area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterproposal/underconsideration

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions