title: Wix Interactions with Conditions, Properties & Custom Actions
body: <p>I am having a problem with a setting the enabled state of a button on a Dialog. The button in question is defined as:</p>
  
  <pre><code>&lt;Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)"&gt;
  &lt;Condition Action="disable"&gt;Validated = 0&lt;/Condition&gt;
  &lt;Condition Action="enable"&gt;&lt;![CDATA[Validated &lt;&gt; 0]]&gt;&lt;/Condition&gt;
  &lt;Publish Event="EndDialog" Value="Return"&gt;1&lt;/Publish&gt;
  &lt;/Control&gt;
  </code></pre>
  
  <p>The property Validated starts out at an initial value of 0, and as expected the next button starts out disabled.</p>
  
  <pre><code>&lt;Property Id="Validated" Value="0"/&gt;
  </code></pre>
  
  <p>The property itself is modified through a Custom Action on another button.</p>
  
  <pre><code>&lt;Control Id="PerformValidation" Type="PushButton" X="225" Y="75" Width="50" Height="20" Text="Validate"&gt;
  &lt;Publish Event="DoAction" Value="ValidateDB"&gt;1&lt;/Publish&gt;
  &lt;/Control&gt;
  </code></pre>
  
  <p>With a stripped down version of the Custom Action like:</p>
  
  <pre><code>[CustomAction]
  public static ActionResult ValidateDatabase(Session session)
  {
  session.Log("Begin ValidateDatabase");
  session["Validated"] = "1";
  return ActionResult.Success;
  }
  </code></pre>
  
  <p>The problem I face is that the Next button does not re-enable itself after the Custom Action has run. I can confirm that the CA does run, and the property is successfully set. The UI will update if I do some other action that causes it to refresh, e.g. go back a page then forward to this page again and the Next button will be enabled.</p>
  
  <p>Any ideas on how to refresh a buttons state after a Custom Action?</p>