[Proposal] FlexLayout Basis<T> extension method overload + Doc and samples
danielftz opened this issue · 4 comments
danielftz commented
FlexLayout Basis extension method overload
- Proposed
- Prototype
- Implementation
- iOS Support
- Android Support
- macOS Support
- Windows Support
- Unit Tests
- Sample
- Documentation MicrosoftDocs/CommunityToolkit#53
Link to Discussion
Summary
This proposal adds a method overload to the Basis<T>
extension method, so that FlexBasis
can be set without the need for instantiating a FlexBasis
struct. Also samples and docs for the existing FlexLayout methods will be added.
Motivation
Allows for more options when declaring FlexBasis
.
Detailed Design
public static TBindable Basis<TBindable>(this TBindable bindable, float length, bool isRelative = false) where TBindable : BindableObject
{
return bindable.Basis(new FlexBasis(length, isRelative));
}
Usage Syntax
Content = new Label().Basis(25, true);
Drawbacks
None
Alternatives
None
Unresolved Questions
None
brminnick commented
Thanks @danielftz! I approve this Proposal ✅
Once we get 3 total approval votes (ie a majority approval from the core team) we'll review + merge the Pull Request 🙌
VladislavAntonyuk commented
Approve
pictos commented
I approve this feature ✅
Deleted user commented
Reopening Proposal.
Only Proposals moved to the Closed
Project Column and Completed
Project Column can be closed.