List View Selected Item Binding in wpf mvvm
<p>I am using a ListView in wpf mvvm pattern whose SelectedItem binding is done to the ViewModel. The problem what I am facing is as soon as I check the checkbox, The SelectedItem binding is not working immediately. It work only when I click again somewhere outside the checkbox and its respective content.</p>

<p>My ListView is like this:</p>

<pre><code>&lt;Grid&gt;
            &lt;Grid.Resources&gt;
                &lt;DataTemplate x:Key="checkboxHeaderTemplate"&gt;
                    &lt;CheckBox IsChecked="{Binding Path=DataContext.AllSelected,RelativeSource={RelativeSource AncestorType=UserControl },Mode=TwoWay}"&gt;
                    &lt;/CheckBox&gt;
                &lt;/DataTemplate&gt;

                &lt;DataTemplate x:Key="CheckBoxCell"&gt;
                    &lt;!--&lt;CheckBox Checked="CheckBox_Checked" /&gt;--&gt;
                    &lt;CheckBox IsChecked="{Binding Path=IsSelected, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" &gt;
                    &lt;/CheckBox&gt;
                &lt;/DataTemplate&gt;

                &lt;DataTemplate x:Key="TextCell"&gt;
                    &lt;TextBlock  Text="Usecasename"&gt;
                    &lt;/TextBlock&gt;
                &lt;/DataTemplate&gt;

                &lt;DataTemplate x:Key="ButtonCell"&gt;
                    &lt;Button  Content="{Binding Path=UsecaseName, Mode=TwoWay}" &gt;
                    &lt;/Button&gt;
                &lt;/DataTemplate&gt;
            &lt;/Grid.Resources&gt;

            &lt;ListView SelectedItem="{Binding SelectedSection}" ItemsSource="{Binding Path=UsecaseListItems}" &gt;
                &lt;ListView.View&gt;
                    &lt;GridView&gt;
                        &lt;GridView.Columns&gt;

                            &lt;GridViewColumn HeaderTemplate="{StaticResource checkboxHeaderTemplate}"
                                        CellTemplate="{StaticResource CheckBoxCell}" Width="auto"&gt;
                            &lt;/GridViewColumn&gt;

                            &lt;GridViewColumn HeaderTemplate="{StaticResource TextCell}"
                                        CellTemplate="{StaticResource ButtonCell}" Width="auto"&gt;
                            &lt;/GridViewColumn&gt;
                        &lt;/GridView.Columns&gt;
                    &lt;/GridView&gt;
                &lt;/ListView.View&gt;
            &lt;/ListView&gt;
        &lt;/Grid&gt;
</code></pre>

<p>The HomeViewModel with which I am binding the Selected itm of List View is like this:</p>

<pre><code>private UseCase _selectedSection;
        public UseCase SelectedSection
        {
            get { return _selectedSection; }
            set
            {
                _selectedSection = value;
                if (this.SelectedSection.UsecaseName == ("CCS01") &amp;&amp; (this.SelectedSection.IsSelected == true))
                {
                    this.ContentWindow = new CCS01();
                }
               else if (this.SelectedSection.UsecaseName == ("CCS02") &amp;&amp; (this.SelectedSection.IsSelected == true))
                {
                    this.ContentWindow = new CCS02();
                }
                else if (this.SelectedSection.UsecaseName == ("ECS52") &amp;&amp; (this.SelectedSection.IsSelected == true))
                {
                    this.ContentWindow = new ECS52();
                }
                else
                    this.ContentWindow = new Default();
                OnPropertyChanged("SelectedSection");
            }
        }
</code></pre>

<p>and The UseCase class is this:</p>

<pre><code>public class UseCase: BaseNotifyPropertyChanged
    {
        public string UsecaseName { get; set; }



        private bool _IsSelected;
        public bool IsSelected
        {
            get { return _IsSelected; }
            set
            {
                _IsSelected = value;
                OnPropertyChanged("IsSelected");

            }
        }




    }
</code></pre>

<p>Please suggest what correction should I do so that, It should hit the binding directly as I check the Checkboxes.</p>