[Proposal] Add AbsoluteLayout Flags Extension Methods #215
Labels
approved
champion
A member of the .NET MAUI Toolkit core team has chosen to champion this feature
documentation approved
proposal
A fully fleshed out proposal describing a new feature in syntactic and semantic detail
Feature name
Update AbsoluteLayout Flags Extensions
Progress tracker
AbsoluteLayoutFlags
Functionality MicrosoftDocs/CommunityToolkit#271Summary
This Proposal adds two new APIs to
AbsoluteLayoutExtensions
and updates the functionality of the existing.LayoutFlags()
API to add existingAbsoluteLayoutFlags
instead of overwriting existingAbsoluteLayoutFlags
.Motivation
1.
.ClearLayoutFlags()
Adding
.ClearLayoutFlags()
allows developers to easily remove any existingAbsoluteLayoutFlags
using fluent APIs.2.
.LayoutFlags()
Allowing this new
.LayoutFlags()
API helps developers (especially new developers) who may be unfamiliar with using Bitwise OR operator. This new API allows developers to pass in multipleAbsoluteLayoutFlags
by listing them sequentially which provides a more natural feel and may be what some developers expect, like so:Detailed Design
Usage Syntax
Drawbacks
None
Alternatives
To clear existing
AbsoluteLayoutFlags
, a developer can use the existing method:To add multiple
AbsoluteLayoutFlags
, a developer can use the existing method:The text was updated successfully, but these errors were encountered: