XAML TwoWay Binding of RadioButton IsChecked
<p>I'm trying to apply two way binding to a radiobutton in WPF. In XAML I have the following:</p>

<pre><code>&lt;RadioButton IsChecked="{Binding IsActive, Mode=TwoWay}"/&gt;
</code></pre>

<p>and in the respective ViewModel I have</p>

<pre><code>private bool _isActive;

public bool IsActive
{
    get { return _isActive; }
    set
    {
        _isActive = value;
        OnPropertyChanged("IsActive");
    }
}
</code></pre>

<p>Because I set mode to <code>TwoWay</code> I was expecting that as I toggle the radiobutton the IsActive property in the view model would get updated accordingly. However, <code>value</code> in <code>set</code> of <code>IsActive</code> is always true so the radiobutton is always on.</p>

<p>Am I misunderstanding the <code>TwoWay</code> property for a radiobutton, and if so how do i go about achieving the desired effect?</p>