title: Windows forms button.Enabled not working visually
body: <p>I am creating a windows forms button dynamically wrapped in another control. The issue that I am having is that when I set the buttons Enabled property it is still being displayed as though it were enabled (not greyed out) however it is not clickalbe. This leads me to believe that I am not creating the button correctly, or something else like that. </p>
  
  <p>This is the code that I use to create the button. </p>
  
  <pre><code>private System.Windows.Forms.Button CreateWindowsButton(SessionButtonTypes sessionButtonType)
  {
          windowsButton = new System.Windows.Forms.Button()
          {
              Top = 3,
              Name = sessionButtonType.ToString(),
              Width = DeterminButtonWidth(guiElement),
              Height = 45,
              FlatStyle = FlatStyle.Flat,
              BackgroundImage = GUI.Instance.GUIImageElement(guiElement)
          };
          // set windows button flat border parameters
          windowsButton.FlatAppearance.BorderSize = 0;
  
          // for testing
          windowsButton.Enabled = false;
  }
  </code></pre>
  
  <p>[UPDATE]
  The solution turns out to be putting image element into the image parameter, not the background image parameter. </p>