Skip to content

Change ComputeConstraintForView to return constraint and set ComputedConstraint via return value (.NET 10.0) #31083

@PureWeen

Description

@PureWeen

For the upcoming net10.0 branch, change the override for ComputeConstraintForView so that it returns the constraint value directly, and set ComputedConstraint via the return value. Also, make the setter for ComputedConstraint private so it can only be set internally. This clarifies the API and helps custom layouts leverage constraint logic by overriding ComputeConstraintForView and returning the appropriate constraint.

Relevant file:
@dotnet/maui/files/src/Controls/src/Core/VisualElement/VisualElement.cs

Make sure to target the net10.0 branch for this work

Metadata

Metadata

Assignees

Labels

p/0Current heighest priority issues that we are targeting for a release.s/triagedIssue has been reviewed

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions