title: CheckBox.AutoCheck in wpf
body: <p>What is the <em>easiest</em> alternative of making <a href="https://msdn.microsoft.com/en-us/library/system.windows.forms.checkbox.autocheck(v=vs.110).aspx" rel="nofollow"><code>checkBox.AutoCheck</code></a><code>= false</code> in WPF? Specifically prevent CheckBox from <strong>changing IsChecked on click</strong>.</p>
  
  <p><code>CheckBox</code> should <strong>still react on clicks</strong> (<code>Command</code> and/or <code>InputBindings</code>), but shouldn't try to change its visual state on left click or <kbd>Space</kbd> key.</p>
  
  <p>I can prevent bound property change by using <code>Mode=OneWay</code>, but this seems have no effect on visual state, <code>CheckBox</code> then become checked while my property is <code>false</code>, which makes me sad...</p>
  
  <p>Here is an example of checkbox:</p>
  
  <pre><code>&lt;!-- make this checkbox behave as if AutoCheck = false --&gt;
  &lt;CheckBox IsChecked="{Binding IsChecked, Mode=OneWay}"
            Command="{Binding CommandLeftButtonOrSpace}"&gt;
      &lt;CheckBox.InputBindings&gt;
          &lt;MouseBinding MouseAction="RightClick"
              Command="{Binding CommandRightButton}" /&gt;
      &lt;/CheckBox.InputBindings&gt;
  &lt;/CheckBox&gt;
  </code></pre>