title: Toggle Button Two Way Binding Not Working (Universal Windows Platform)
body: <p>I am trying to bind the "IsChecked" property on the ToggleButton to "ModelView.IsEnabled".<br>
  "ModelView.IsEnabled" is always "false"<br>
  but somehow the ToggleButton can still show as "Checked".<br>
  <strong>Is there anything wrong with the binding?</strong><br>
  <a href="https://i.stack.imgur.com/vnzfs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vnzfs.png" alt="enter image description here"></a></p>
  
  <p><strong>XAML</strong></p>
  
  <pre><code>...
  &lt;Page.Resources&gt;
      &lt;ModelView:ModelView x:Key="ModelView"/&gt;
  &lt;/Page.Resources&gt;
  &lt;Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"&gt;
      &lt;ToggleButton IsChecked="{Binding Source={StaticResource ModelView}, Path=IsEnabled, Mode=TwoWay}"&gt;
          &lt;TextBlock &gt;UWP Toggle Button&lt;/TextBlock&gt;
      &lt;/ToggleButton&gt;
  &lt;/Grid&gt;
  ...
  </code></pre>
  
  <p><strong>ModelView.cs</strong>  </p>
  
  <pre><code>using...
  
  namespace App2
  {
      class ModelView : INotifyPropertyChanged
      {
          public event PropertyChangedEventHandler PropertyChanged;
          public event EventHandler CanExecuteChanged;
  
          private bool _isEnabled;
  
          public bool IsEnabled
          {
              get {
                  return _isEnabled;
              }
              set
              {
                  _isEnabled = false;
                  OnPropertyChanged("IsEnabled");
              }
          }
  
          protected void OnPropertyChanged(string name)
          {
              PropertyChangedEventHandler handler = PropertyChanged;
              if (handler != null)
              {
                  handler(this, new PropertyChangedEventArgs(name));
              }
          }
      }
  }
  </code></pre>