title: How to prevent UI from redrawing every control one by one
body: <p>In my user control I perform a lengthy operation. In order to prevent users from clicking the UI, I show a progress bar and I disable the whole UI, like this:</p>
  
  <pre><code>this.Enabled = false;
  ShowProgressBar();
  DoLengthyOperation();
  RemoveProgressBar();
  this.Enabled = true;
  </code></pre>
  
  <p>This works OK. However, my user control has many other controls on it, which also have controls inside them, which also have controls inside them,... etc. The </p>
  
  <pre><code>this.Enabled = false 
  </code></pre>
  
  <p>call thus disables many many controls. This is intentional. But the problem I have is that you can actually see the UI disabling every control one by one. It goes pretty fast but since there are so many controls, you can actually see it running through all the controls. This does not look professional, it makes the screen flicker and my eyes hurt.</p>
  
  <p>Is there a way so that I can prevent the UI from redrawing until all controls are disabled and then perform a single redrawing?</p>
  
  <p>I hope this is not a stupid question ;)</p>
  
  <p>Don't know if this is relevant: my controls are derived from DevExpress.XtraEditors.XtraUserControl.</p>