{"id":13713045,"url":"https://github.com/TBertuzzi/Xamarin.Forms.MultiSelectListView","last_synced_at":"2025-05-06T22:32:21.408Z","repository":{"id":50308014,"uuid":"124266536","full_name":"TBertuzzi/Xamarin.Forms.MultiSelectListView","owner":"TBertuzzi","description":":ballot_box_with_check:  Select multiple rows in a listview with xamarin.forms","archived":false,"fork":false,"pushed_at":"2021-10-05T16:53:58.000Z","size":341,"stargazers_count":61,"open_issues_count":6,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T03:51:42.405Z","etag":null,"topics":["android","control","ios","nuget","nuget-package","xamarin","xamarin-forms","xamarin-library","xamarin-plugin","xamarinforms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TBertuzzi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-07T16:53:10.000Z","updated_at":"2024-11-12T09:00:57.000Z","dependencies_parsed_at":"2022-09-24T11:41:54.196Z","dependency_job_id":null,"html_url":"https://github.com/TBertuzzi/Xamarin.Forms.MultiSelectListView","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/TBertuzzi%2FXamarin.Forms.MultiSelectListView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBertuzzi%2FXamarin.Forms.MultiSelectListView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBertuzzi%2FXamarin.Forms.MultiSelectListView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBertuzzi%2FXamarin.Forms.MultiSelectListView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TBertuzzi","download_url":"https://codeload.github.com/TBertuzzi/Xamarin.Forms.MultiSelectListView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779457,"owners_count":21802952,"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":["android","control","ios","nuget","nuget-package","xamarin","xamarin-forms","xamarin-library","xamarin-plugin","xamarinforms"],"created_at":"2024-08-02T23:01:26.517Z","updated_at":"2025-05-06T22:32:20.956Z","avatar_url":"https://github.com/TBertuzzi.png","language":"C#","funding_links":[],"categories":["UI"],"sub_categories":[],"readme":"# Xamarin.Forms.MultiSelectListView\n\n Select multiple rows in a listview with xamarin.forms.\n \n By default the listview control lets you only select one row at a time. The MultiSelectListView control uses a modified ObservableCollection to mark which rows have been selected.\n \n You can use any image to mark the selected row.\n \n ###### This is the component, works on iOS and Android.\n \n![](https://raw.githubusercontent.com/TBertuzzi/Xamarin.Forms.MultiSelectListView/master/Resources/select.png)\n \n**NuGet**\n\n|Name|Info|\n| ------------------- | :------------------: |\n|MultiSelectListView|[![NuGet](https://buildstats.info/nuget/Xamarin.Forms.MultiSelectListView)](https://www.nuget.org/packages/Xamarin.Forms.MultiSelectListView/)|\n|Build status|[![Build status](https://ci.appveyor.com/api/projects/status/github/TBertuzzi/xamarin-forms-multiselectlistview?branch=master\u0026svg=true)](https://ci.appveyor.com/project/ThiagoBertuzzi/xamarin-forms-multiselectlistview)|\n\n**Build History**\n\n[![Build history](https://buildstats.info/appveyor/chart/ThiagoBertuzzi/xamarin-forms-multiselectlistview?buildCount=33)](https://ci.appveyor.com/project/ThiagoBertuzzi/xamarin-forms-multiselectlistview/history)\n\n**Platform Support**\n\nMultiSelectListView is a .NET Standard 2.0 library.Its only dependency is the Xamarin.Forms\n\n## Setup / Usage\n\nBasically the key is to use the MultiSelectObservableCollection instead of the conventional ObservableCollection.\n\n```csharp\n\npublic MultiSelectObservableCollection\u003cUser\u003e Users { get; }\n\n```\n\nThe \"IsSelected\" property notifies when an object has been selected.\n\nin the Xaml file we must declare our control xmlns: lv = \"clr-namespace: Xamarin.Forms.MultiSelectListView; assembly = Xamarin.Forms.MultiSelectListView\", for example . \n\nThen use the new MultiSelect.Enable property to enable the multiple selection in the listview.\n\nwe must use the SelectableCell that contains the property to inform the icon of the selection\n\n```csharp\n\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?\u003e\n\u003cContentPage xmlns=\"http://xamarin.com/schemas/2014/forms\"\n             xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n             xmlns:local=\"clr-namespace:MultiSelectListViewSample\"\n             x:Class=\"MultiSelectListViewSample.MainPage\"\n            xmlns:lv=\"clr-namespace:Xamarin.Forms.MultiSelectListView;assembly=Xamarin.Forms.MultiSelectListView\" Padding=\"0,20,0,0\"\u003e\n\n    \u003cStackLayout\u003e\n        \u003cListView x:Name=\"lvwUsers\" \n            HasUnevenRows=\"true\"\n            SeparatorVisibility=\"Default\" \n            ItemsSource=\"{Binding Users}\"\n                  lv:MultiSelect.Enable=\"true\"\u003e\n            \u003cListView.ItemTemplate\u003e\n                \u003cDataTemplate\u003e\n                    \u003clv:SelectableCell x:Name=\"SelectableCell\"\u003e\n\n                        \u003clv:SelectableCell.CheckView\u003e\n                            \u003cImage Source=\"select.png\" WidthRequest=\"30\" HeightRequest=\"30\"\u003e\u003c/Image\u003e\n                        \u003c/lv:SelectableCell.CheckView\u003e\n\n                        \u003clv:SelectableCell.DataView\u003e\n                            \u003cStackLayout Orientation=\"Vertical\" Padding=\"20,0,20,0\"\u003e\n                                \u003cLabel Text=\"{Binding Name}\" FontSize=\"17\" \u003e\u003c/Label\u003e\n                            \u003c/StackLayout\u003e\n                        \u003c/lv:SelectableCell.DataView\u003e\n\n                    \u003c/lv:SelectableCell\u003e\n\n                \u003c/DataTemplate\u003e\n            \u003c/ListView.ItemTemplate\u003e\n\n        \u003c/ListView\u003e\n    \u003c/StackLayout\u003e\n\n\u003c/ContentPage\u003e\n\n\n\n\n```\n\n## SelectedItemBehavior\n\nSelectedItemBehavior to execute the command when the SelectedItem event occurs in ListView. Pass the item selected in ListView to Command. \n\nBased on SelectedItemBehavior by [Atsushi Nakamura](https://github.com/nuitsjp) (https://github.com/nuitsjp/Xamarin.Forms.BehaviorsPack).\n\nIf ClearSelected property is true, SelectedItem property of ListView is cleared after command execution. Default ClearSelected property value is true.\n\nYou can use the object of the selected line\n\n```csharp\n\n  \u003cListView.Behaviors\u003e\n        \u003clv:SelectedItemBehavior Command=\"{Binding DisplayNameCommand}\"/\u003e\n  \u003c/ListView.Behaviors\u003e\n\n```\n\nOr specify the property you want to pass as a parameter\n\n```csharp\n\n  \u003cListView.Behaviors\u003e\n       \u003clv:SelectedItemBehavior Command=\"{Binding DisplayNameCommand}\" PropertyName=\"Name\"/\n  \u003c/ListView.Behaviors\u003e\n\n```\n\n\nThe complete example can be downloaded here: https://github.com/TBertuzzi/Xamarin.Forms.MultiSelectListView/tree/master/MultiSelectListViewSample\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTBertuzzi%2FXamarin.Forms.MultiSelectListView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTBertuzzi%2FXamarin.Forms.MultiSelectListView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTBertuzzi%2FXamarin.Forms.MultiSelectListView/lists"}