satish maddili

satish maddili

  • NA
  • 46
  • 10.8k

how to implement checkbox in xamarin forms

May 31 2018 9:19 AM
hi ,
 
I am implementing checkboxes using xlabs.controls.That checkboxes are inside the listview,but i cannot access the checkbox values in viewmodel or codebehind also.please help me.
 
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:LS_Service.ViewModel"
xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
xmlns:helper="clr-namespace:LS_Service.Helper"
x:Class="LS_Service.Views.LS_Leaftypes" NavigationPage.HasNavigationBar="False">
 
 
<ListView x:Name="LS_leaftags" HasUnevenRows="True" ItemsSource="{Binding getlsleafdata}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout x:Name="leaftypelayout" Orientation="Horizontal" HorizontalOptions="FillAndExpand" BackgroundColor="White" Padding="0,4,0,4">
<controls:CheckBox DefaultText="{Binding tag}" x:Uid="{Binding tagid}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
 

Answers (1)