I'm pretty new to WPF & MVVM, I'm having 3 CheckBox items on the panel, I need that each time when the user click one of them a method will be called. This method should check the status of each one of the 3 CheckBox (which one of them is 'Checked', and which of them is 'Unchecked') and use this information for displaying some text on a TextBlock. For example it will display "A" if all the 3 are Checked, and "B" if all of them are Unchecked.

I got little complicated with this, and hope that you can help me with this.

**Here is the XAML code:**

```
<StackPanel>
    <ItemsControl Margin="5" ItemsSource="{Binding Path=CheckBoxCollection, Mode=TwoWay}" >
         <ItemsControl.ItemTemplate>
            <DataTemplate>
                <CheckBox IsChecked="{Binding Path=CheckBoxValue, Mode=TwoWay}" />
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>

    <TextBlock>Result Here</TextBlock>
</StackPanel>

```

**Here is the code behind:**

```
public class CheckBoxValue
{
    bool _theValue;

    public bool theValue
    {
        get
        {
            return _theValue;
        }

        set
        {
            _theValue = value;
        }
    }
}

public class myViewModel : ViewModelBase
{
    public ObservableCollection<CheckBoxValue> CheckBoxCollection { get; set; }

    public myViewModel( Some Parameters.... )
    {
        CheckBoxCollection = new ObservableCollection<CheckBoxValue>();

        CheckBoxCollection.Add(new CheckBoxValue { theValue = false });
        CheckBoxCollection.Add(new CheckBoxValue { theValue = false });
        CheckBoxCollection.Add(new CheckBoxValue { theValue = false });

        base.RaisePropertyChanged( () => CheckBoxCollection );
    }
}

```