Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an extension method for BindableLayout ItemsSource that takes IEnumerable<T> as its parameter #103

Closed
egvijayanand opened this issue Jun 14, 2024 · 1 comment
Assignees
Milestone

Comments

@egvijayanand
Copy link
Owner

Add an extension method for BindableLayout's ItemSource that takes IEnumerable<T> as its parameter.

This enables using the Collection Expression to define the items collection.

public static TLayout ItemsSource<TLayout, T>(this TLayout layout, IEnumerable<T> items) {}

Usage:

new StackLayout()
    .ItemTemplate(() => new Label().Bind())
    .ItemsSource(["Red", "Green", "Blue"]);
@egvijayanand egvijayanand changed the title Add an extension method for BindableLayout ItemSource that takes IEnumerable<T> as its input Add an extension method for BindableLayout ItemsSource that takes IEnumerable<T> as its parameter Jun 14, 2024
@egvijayanand egvijayanand self-assigned this Jun 14, 2024
@egvijayanand egvijayanand added this to the v3.5.0 milestone Jul 9, 2024
@egvijayanand
Copy link
Owner Author

This feature is now part of the below releases:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant