title: Awesomium WebControl trouble with Enable Control in Winform c#
body: <p>I would use this Browser Framework in my Winform Application c#.</p>
  
  <p>I just Saw the Documentation <a href="http://www.awesomium.com/docs/1_6_3/sharp_api/html/163d5346-d13d-e0cf-49ba-72b2b04d7620.htm" rel="nofollow">HERE</a> </p>
  
  <p>So i would use this <a href="http://www.awesomium.com/docs/1_6_3/sharp_api/html/86d5c96f-1c89-b275-5e3a-d1812435722c.htm" rel="nofollow" title="Method">Method</a></p>
  
  <p>I just create a new Class and a new Awesomium.Windows.Forms.WebControl Object.</p>
  
  <p>Now if i use it without any particulary method (just the ones to create object and Load the Url Source it works. But when i want use This method : </p>
  
  <pre><code>browser.SetHeaderDefinition("MyHeader", myCol); //myCol is a NameValueCollection 
  </code></pre>
  
  <p>i recive this error <code>The control is disabled either manually or it has been destroyed.</code></p>
  
  <p>On the first page that i linked there is wrote : </p>
  
  <hr>
  
  <p>In addition to its regular meaning, the Enabled property has a special meaning in WebControl: it also indicates if the underlying view is valid and enabled.</p>
  
  <p>A WebControl is considered invalid when it has been destroyed (by either calling Close() or Shutdown()) or was never properly instantiated.</p>
  
  <p>Manually setting the Enabled property to true, will temporarily render the control disabled.
  ....
  ....</p>
  
  <h2>While disabled (either because the view is destroyed or because you manually set this property) attempting to access members of this control, may cause a InvalidOperationException (see the documentation of each member).</h2>
  
  <p>Now i tried to play with the <em>ENABLED property</em> but i still get this error. What i have to do to resolve this problem? I really didn't understand.</p>
  
  <pre><code>   Awesomium.Windows.Forms.WebControl browser = 
                                          new Awesomium.Windows.Forms.WebControl();
                      this.SuspendLayout();
          browser.Location = new System.Drawing.Point(1, 12);
         browser.Name = "webControl1";
         browser.Size = new System.Drawing.Size(624, 442);
       browser.Source = new System.Uri("http://www.google.it", System.UriKind.Absolute);
                      browser.TabIndex = 0;
  **** This below is the code that i cant use cause i get the error control
  // System.Collections.Specialized.NameValueCollection myCol = 
  // new System.Collections.Specialized.NameValueCollection();
  //            myCol.Add("Referer", "http://www.yahoo.com");
  //            browser.SetHeaderDefinition("MyHeader", myCol);
  //            browser.AddHeaderRewriteRule("http://*", "MyHeader"); 
  </code></pre>