Forum Xamarin.Forms

Xamarin.Forms.Labs - Checkboxes in ListView not working on Windows Phone 8?

DavidSpicerDavidSpicer USMember, University

This question was asked on stackoverflow ( but never answered.

The checkboxes show up for each item in the listview and correctly reflect the state of what the Checked property is bound to in the viewmodel. The problem is that when you interact with one of them the changed state isn't shown in the view. The change from un-checked to checked or the reverse is passed via the binding to the viewmodel. If you close the view and reopen it the item you changed now reflects what you did.

The same code works as expected in the Android application. From what I can tell I have initialized Xamarin Forms Labs. If I comment out what was added to the constructor for App in App.xaml.cs when I run I get no checkboxes.

If it makes a difference the checkboxes are used in the ViewCell template of the ListView which is in a TabbedPage child.

<ContentPage Title="{Binding PIShowListHeaderText}">
      <ListView Grid.Row="1"
                ItemsSource="{Binding ThisList.ListView, Mode=OneWay}">
          <OnPlatform x:TypeArguments="x:Int32"
                      WinPhone="100" />
        <StackLayout Orientation="Vertical">
                <Label Text="{Binding IdxName}" TextColor="White" />
                <StackLayout Orientation="Horizontal">
                  <Label Text="     " />
                  <controls:CheckBox DefaultText="Life List"
                                     Checked="{Binding LifeList, Mode=TwoWay}"
                                     FontSize="{StaticResource checkBoxFontSize}" />
                  <controls:CheckBox DefaultText="State"
                                     Checked="{Binding SeenInThisState, Mode=TwoWay}"
                                     FontSize="{StaticResource checkBoxFontSize}" />
                  <controls:CheckBox DefaultText="This List"
                                     Checked="{Binding SeenThisList, Mode=TwoWay}"
                                     FontSize="{StaticResource checkBoxFontSize}" />



Sign In or Register to comment.