Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SuavePirate/DynamicStackLayout
A Xamarin.Forms control for having dynamic child views stacked either horizontally or vertically.
https://github.com/SuavePirate/DynamicStackLayout
Last synced: 3 months ago
JSON representation
A Xamarin.Forms control for having dynamic child views stacked either horizontally or vertically.
- Host: GitHub
- URL: https://github.com/SuavePirate/DynamicStackLayout
- Owner: SuavePirate
- License: mit
- Created: 2017-12-01T20:32:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-06T04:27:52.000Z (over 6 years ago)
- Last Synced: 2024-05-13T00:07:20.315Z (9 months ago)
- Language: C#
- Homepage:
- Size: 29.3 KB
- Stars: 70
- Watchers: 5
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xamarin-forms - DynamicStackLayout ★72
README
# DynamicStackLayout
A Xamarin.Forms layout for creating dynamically wrapped views. Inspired by the `WrapLayout` example: https://developer.xamarin.com/samples/xamarin-forms/UserInterface/CustomLayout/WrapLayout/## Installation
It's on NuGet! https://www.nuget.org/packages/DynamicStackLayout/
```
Install-Package DynamicStackLayout
```Be sure to install in all projects that use it.
## Usage
There are two key properties that make this control useful - the `ItemsSource` (like a `ListView`) and the `ItemTemplate` (although, you can also just add children to the view - it does both!)
Be sure to wrap it in a `ScrollView` though**XAML**
Add the `xmlns`:
```
xmlns:suave="clr-namespace:SuaveControls.DynamicStackLayout;assembly=SuaveControls.DynamicStackLayout"
```Use it in your View:
```
```
Don't like data-binding and want to just use child views? You can do that too!
```
```
Check out this blog post for more details! https://alexdunn.org/2017/12/12/xamarin-nuget-xamarin-forms-dynamic-bindable-stacklayout/
## Features
- Bindable child views
- Bindable to collections
- Handles layout changing well (try rotating the device)
- Doesn't require custom renderers (All Xamarin.Forms baby!)## What does this thing look like?


## Notes
This does not use any native view virtualization, which means performance does not scale well with extremely large data sets.## Coming soon
- `ItemSelected` event and `SelectedItem` bindable property (for now, you can add custom gestures and commands to your `DataTemplate` and handle the events yourself)
- Better Collection Updating