A list of the checkboxes is inside the ListView and the ListView is inside the usercontrol. Data binding is done. <ListView x:Name="listMenu" MinHeight="60" FontSize="14" Foreground="White" IsItemClickEnabled="True" ItemsSource="{x:Bind Items, Mode=TwoWay}"> <ListView.ItemTemplate> <DataTemplate> <ListViewItem Margin="0" VerticalAlignment="Center" Style="{StaticResource SettingsChangeLanguageListStyle}"> <StackPanel Orientation="Vertical"> <CheckBox x:Name="termsOfServiceCheckBox" HorizontalAlignment="Left" VerticalAlignment="Center" Command="{Binding AreaOfExpertiseCommand}" Content="{Binding TopicName}" FontFamily="{StaticResource osRegular}" FontSize="14" Foreground="#636E7F" IsChecked="{Binding IsSelected, Mode=TwoWay}" Style="{StaticResource CheckBoxCustomStyle}" /> </StackPanel> </ListViewItem> </DataTemplate> </ListView.ItemTemplate> </ListView> Now I want to trigger Checked/Uncheck event or Command to get my current checked or unchecked CheckBox using the MVVM pattern. I have created a Dependency Property for Command which is not executing on checking/unchecking the checkbox. public ICommand AreaOfExpertiseCommand { get { return (ICommand)GetValue(AreaOfExpertiseCommandProperty); } set { SetValue(AreaOfExpertiseCommandProperty, value); } } public static readonly DependencyProperty AreaOfExpertiseCommandProperty = DependencyProperty.Register(nameof(AreaOfExpertiseCommand), typeof(ICommand), typeof(AreaOfExpertiseUserControl), new PropertyMetadata(null)); ViewModel.cs : public ICommand AreaOfExpertiseCommand => new RelayCommand(UpdateAreaOfExpertiseAsync); private void UpdateAreaOfExpertiseAsync() { } Any help will be appreciated..
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)