mercredi 27 décembre 2017

wpf bind command to checkbob in list box

i have a ListBox that host checkbox values

i want to do a command with check box but it does not bind

<ListBox Name="CategoriesListBox" ItemsSource="{Binding AllCategories}">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <CheckBox IsEnabled="True" Content="{Binding Path=Name}" IsChecked="{Binding Path=IsChecked, Mode=TwoWay}" Margin="1,1,1,1"
              Command="{Binding UpdateCategoriesCommand}"/>
    </DataTemplate>
</ListBox.ItemTemplate>

i have the problem with

Command="{Binding UpdateCategoriesCommand}

any help ?




Aucun commentaire:

Enregistrer un commentaire