A Zebble plugin to allows you add an option list from a source.
With this plugin you can add single and multiple selection list from a data source and add some action to do when they selected or not.
- Available on NuGet: https://www.nuget.org/packages/Zebble.OptionsList/
- Install in your platform client projects.
- Available for iOS, Android and UWP.
To use this plugin in markup or c# code you can use below code:
<OptionsList Id="MyOptionsList" Direction="Vertical" MultiSelect="true" />
await Add(new OptionsList { Id = "MyOptionsList", Direction = RepeatDirection.Vertical, MultiSelect = true });
You can set the DataSource property (either in markup or C#) to populate the options list. The data source can be any IEnumerable object.
<OptionsList ... DataSource="GetSource() />
C# code-behind:
IEnumerable<Contacts> GetMyOptions()
{
....
}
Property | Type | Android | iOS | Windows |
---|---|---|---|---|
Source | OptionsDataSource | x | x | x |
List | OptionsListView | x | x | x |
Value | Object | x | x | x |
DataSource | IEnumerable<object> | x | x | x |
MultiSelect | bool | x | x | x |
Direction | RepeatDirection | x | x | x |
Event | Type | Android | iOS | Windows |
---|---|---|---|---|
SelectedItemChanged | AsyncEvent<Option> | x | x | x |