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 support to specify ItemsPanel for ItemsControl elements such as GridView #252

Closed
pawisesa opened this issue May 19, 2023 · 2 comments
Closed
Labels
enhancement New feature or request
Milestone

Comments

@pawisesa
Copy link

Summary

We're looking to use GridView as a radio for our app but we need to have the GridView and its GridViewItems to take the full width of the container and currently the GridView as implemented in react-native-xaml doesn't do that and there doesn't seem to be an option to configure it to take up the full width.

Looking into the XAML tree we see that the ItemsPresenter used by the react-native-xaml GridView currently is using ItemsWrapGrid and searching around it seems like a solution to make a GridView take up the full width in XAML is to use ItemsStackPanel instead for the GridView's ItemsPanel https://stackoverflow.com/a/35451090, however there's no option to set this for react-native-xaml currently.

There are multiple different possible Panel but for now only ItemsWrapGrid and ItemsStackPanel may be needed as options.

Motivation

This is needed to make GridView and other ItemsControl able to take up the full width of it's container. This would be useful for any user of GridView.

Basic Example

No response

Open Questions

No response

@pawisesa pawisesa added the enhancement New feature or request label May 19, 2023
@chrisglein chrisglein added this to the Backlog milestone May 22, 2023
@chrisglein
Copy link
Member

There's a lot of work here. It may be more straightforward for you to create a custom GridView that has the configuration you want. That'd also future proof you from any other gaps in react-native-xaml.

@pawisesa
Copy link
Author

Will be making a custom GridView that uses ItemsStackPanel as the ItemsPanel.

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

No branches or pull requests

2 participants