{"id":13709848,"url":"https://github.com/SuavePirate/DynamicStackLayout","last_synced_at":"2025-05-06T18:33:05.132Z","repository":{"id":144175124,"uuid":"112783960","full_name":"SuavePirate/DynamicStackLayout","owner":"SuavePirate","description":"A Xamarin.Forms control for having dynamic child views stacked either horizontally or vertically. ","archived":false,"fork":false,"pushed_at":"2018-09-06T04:27:52.000Z","size":30,"stargazers_count":70,"open_issues_count":3,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-13T00:07:20.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SuavePirate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-01T20:32:08.000Z","updated_at":"2024-05-13T00:07:21.812Z","dependencies_parsed_at":"2024-05-13T00:07:21.684Z","dependency_job_id":"1c106d3c-7016-4859-a042-b5122d135f4d","html_url":"https://github.com/SuavePirate/DynamicStackLayout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuavePirate%2FDynamicStackLayout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuavePirate%2FDynamicStackLayout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuavePirate%2FDynamicStackLayout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SuavePirate%2FDynamicStackLayout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SuavePirate","download_url":"https://codeload.github.com/SuavePirate/DynamicStackLayout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224521401,"owners_count":17325229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T23:00:47.109Z","updated_at":"2024-11-13T20:30:29.307Z","avatar_url":"https://github.com/SuavePirate.png","language":"C#","readme":"# DynamicStackLayout\nA Xamarin.Forms layout for creating dynamically wrapped views. Inspired by the `WrapLayout` example: https://developer.xamarin.com/samples/xamarin-forms/UserInterface/CustomLayout/WrapLayout/\n\n## Installation\n\nIt's on NuGet! https://www.nuget.org/packages/DynamicStackLayout/\n```\nInstall-Package DynamicStackLayout\n```\n\nBe sure to install in all projects that use it.\n\n## Usage\n\nThere 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!)\nBe sure to wrap it in a `ScrollView` though\n\n**XAML**\n\nAdd the `xmlns`:\n\n```\nxmlns:suave=\"clr-namespace:SuaveControls.DynamicStackLayout;assembly=SuaveControls.DynamicStackLayout\"\n```\n\nUse it in your View:\n```\n\u003cScrollView\u003e\n    \u003csuave:DynamicStackLayout ItemsSource=\"{Binding Items}\" HorizontalOptions=\"Fill\"\u003e\n        \u003csuave:DynamicStackLayout.ItemTemplate\u003e\n            \u003cDataTemplate\u003e\n                \u003cStackLayout BackgroundColor=\"Gray\" WidthRequest=\"120\" HeightRequest=\"180\"\u003e\n                    \u003cLabel Text=\"{Binding .}\" VerticalOptions=\"FillAndExpand\" HorizontalOptions=\"FillAndExpand\" VerticalTextAlignment=\"Center\" HorizontalTextAlignment=\"Center\" /\u003e\n                \u003c/StackLayout\u003e\n            \u003c/DataTemplate\u003e\n        \u003c/suave:DynamicStackLayout.ItemTemplate\u003e\n    \u003c/suave:DynamicStackLayout\u003e\n\u003c/ScrollView\u003e\n```\n\nDon't like data-binding and want to just use child views? You can do that too!\n\n```\n\u003cScrollView\u003e\n    \u003csuave:DynamicStackLayout HorizontalOptions=\"Fill\"\u003e\n      \u003cStackLayout BackgroundColor=\"Gray\" WidthRequest=\"120\" HeightRequest=\"180\"\u003e\n          \u003cLabel Text=\"0\" TextColor=\"White\" VerticalOptions=\"FillAndExpand\" HorizontalOptions=\"FillAndExpand\" VerticalTextAlignment=\"Center\" HorizontalTextAlignment=\"Center\" /\u003e\n      \u003c/StackLayout\u003e\n      \u003cStackLayout BackgroundColor=\"Gray\" WidthRequest=\"120\" HeightRequest=\"180\"\u003e\n          \u003cLabel Text=\"1\" TextColor=\"White\" VerticalOptions=\"FillAndExpand\" HorizontalOptions=\"FillAndExpand\" VerticalTextAlignment=\"Center\" HorizontalTextAlignment=\"Center\" /\u003e\n      \u003c/StackLayout\u003e\n      \u003cStackLayout BackgroundColor=\"Gray\" WidthRequest=\"120\" HeightRequest=\"180\"\u003e\n          \u003cLabel Text=\"2\" TextColor=\"White\" VerticalOptions=\"FillAndExpand\" HorizontalOptions=\"FillAndExpand\" VerticalTextAlignment=\"Center\" HorizontalTextAlignment=\"Center\" /\u003e\n      \u003c/StackLayout\u003e\n      \u003cStackLayout BackgroundColor=\"Gray\" WidthRequest=\"120\" HeightRequest=\"180\"\u003e\n          \u003cLabel Text=\"3\" TextColor=\"White\" VerticalOptions=\"FillAndExpand\" HorizontalOptions=\"FillAndExpand\" VerticalTextAlignment=\"Center\" HorizontalTextAlignment=\"Center\" /\u003e\n      \u003c/StackLayout\u003e\n      \u003cStackLayout BackgroundColor=\"Gray\" WidthRequest=\"120\" HeightRequest=\"180\"\u003e\n          \u003cLabel Text=\"4\" TextColor=\"White\" VerticalOptions=\"FillAndExpand\" HorizontalOptions=\"FillAndExpand\" VerticalTextAlignment=\"Center\" HorizontalTextAlignment=\"Center\" /\u003e\n      \u003c/StackLayout\u003e\n    \u003c/suave:DynamicStackLayout\u003e\n\u003c/ScrollView\u003e\n```\n\nCheck out this blog post for more details! https://alexdunn.org/2017/12/12/xamarin-nuget-xamarin-forms-dynamic-bindable-stacklayout/\n\n## Features\n\n- Bindable child views\n- Bindable to collections\n- Handles layout changing well (try rotating the device)\n- Doesn't require custom renderers (All Xamarin.Forms baby!)\n\n## What does this thing look like?\n\n![horizontal scrolling stacklayout](https://alexdunndev.files.wordpress.com/2017/12/screen-shot-2017-12-12-at-1-16-43-pm.png?w=327\u0026h=576)\n![horizontal scrolling stacklayout](https://alexdunndev.files.wordpress.com/2017/12/screen-shot-2017-12-12-at-1-16-54-pm.png?w=325\u0026h=576)\n![horizontal scrolling stacklayout](https://alexdunndev.files.wordpress.com/2017/12/screen-shot-2017-12-12-at-1-17-08-pm.png?w=656\u0026h=369)\n\n## Notes\nThis does not use any native view virtualization, which means performance does not scale well with extremely large data sets.\n\n## Coming soon\n\n- `ItemSelected` event and `SelectedItem` bindable property (for now, you can add custom gestures and commands to your `DataTemplate` and handle the events yourself)\n- Better Collection Updating\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSuavePirate%2FDynamicStackLayout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSuavePirate%2FDynamicStackLayout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSuavePirate%2FDynamicStackLayout/lists"}