INotifyPropertyChanged binding selected checkboxes in MVVM : <p>I am trying to rewrite my CheckBoxList from Code Behind to MVVM pattern in WPF C#. The thing is that now I have a problem to get all selected checkboxes. I have implemented  INotifyPropertyChanged interface. Project is building correctly, when I set the break point I can notice that I received always false value for my checkboxes, even if they are selected. I assume that maybe I did something wrong with data binding. Please, does anybody can help? I am totally newbie in MVVM.</p>

<p><strong>INotifyPropertyChanged Implementation</strong> </p>

<pre><code>    public class ObservableObject : INotifyPropertyChanged
    {

        #region INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string strPropertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(strPropertyName));
        }

        #endregion

    }
}
</code></pre>

<p><strong>Model</strong></p>

<pre><code> public class SharedModel : ObservableObject
    {

        public bool IsSelected { get; set; }

        public string Name { get; set; }

        public string Method { get; set; }
    }
</code></pre>

<p><strong>ViewModel</strong></p>

<pre><code>   class TestViewModel : ObservableObject
    {
                private bool _fIsSelected;

                public bool IsSelected
                {
                    get =&gt; _fIsSelected;
                    set
                    {
                        _fIsSelected = value;
                        OnPropertyChanged("IsSelected");
                    }
                }

        public ObservableCollection&lt;SharedModel&gt; List { get; set; } = new ObservableCollection&lt;SharedModel&gt;
        {
            new SharedModel
            {
                Name = "A1",
                Method = Test(),
            },
            new SharedModel
            {
                Name = "A2",
                Method = TestOne()
            }
};

        public string GetSelectedCheckboxes()
        {
             var command =
                    from item in List
                    where item.IsSelected
                    select item.Method;
          return string.Join("\r&amp;", new NewList&lt;string&gt;(command).ToArray());
        }
</code></pre>

<p>Checkboxlist in XAML</p>

<pre><code>&lt;StackPanel Margin="0,0,769,510"&gt;
            &lt;ListBox Name="ListBox"
                     ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                     ItemsSource="{Binding List}"
                     SelectionMode="Multiple" Background="{x:Null}" Margin="0,133,590,470" Foreground="White" BorderBrush="{x:Null}"&gt;
                &lt;ListBox.ItemsPanel&gt;
                    &lt;ItemsPanelTemplate&gt;
                        &lt;WrapPanel /&gt;
                    &lt;/ItemsPanelTemplate&gt;
                &lt;/ListBox.ItemsPanel&gt;
                &lt;ListBox.ItemTemplate&gt;
            &lt;DataTemplate&gt;
                &lt;StackPanel Orientation="Horizontal"
                                    MinWidth="170" MaxWidth="170"
                                    Margin="0,0, 0, 0" &gt;
                            &lt;CheckBox x:Name="TestCheckbox"
                                      Tag="{Binding Method}" IsChecked="{Binding IsSelected}" /&gt;
                            &lt;ContentPresenter
                                Content="{Binding Name}"
                                Margin="5,0, 15, 0" /&gt;
                        &lt;/StackPanel&gt;
                    &lt;/DataTemplate&gt;
                &lt;/ListBox.ItemTemplate&gt;
            &lt;/ListBox&gt;
        &lt;/StackPanel&gt;
</code></pre>

<p><strong>Test View</strong></p>

<pre><code>public partial class TestView : UserControl
{

    public TestView()
    {
        InitializeComponent();
        DataContext = new TestViewModel();
    }
</code></pre>
