title: Setting the value in OpenXml checkbox word2013
body: <p>So I have a document that I am editing through a WPF(C#) application.
  I have successfully edited Plain Text content controls, but now I am stuck checking/unchecking the Checkboxes within the form.</p>
  
  <p>I successfully find the checkbox and set the value and save the document, but the checkboxes that are set to true are never checked within the word document when I open it.</p>
  
  <p>Here is the code that I use to manipulate the checkboxes.
  NOTE: I access the checkboxes at the tag level, hence the field.parent.parent</p>
  
  <pre><code>private static void SetCheckBox(OpenXmlElement field, bool isChecked)
  {
      var checkBox = field.Parent.Parent.Descendants&lt;SdtContentCheckBox&gt;().ToList();
      foreach (var check in checkBox)
      {
          if (isChecked)
          {
              check.Checked.Val = OnOffValues.True;
          }
          else
          {
              check.Checked.Val = OnOffValues.False;
          }
          MessageBox.Show(check.Checked.Val);
      }
  }
  </code></pre>
  
  <p>When I display the values in the MessageBox they display 0/1 for true/false. So they are in fact being set.</p>
  
  <p>Am I doing this properly?</p>