title: Converting an unknown class to its base class
body: <p>I'm creating a custom toolbox in windows forms (like the one you pick the controls in the VS Form Designer). To get the image that appears on side of the text of the control I'm using this:</p>
  
  <pre><code>ToolboxItem tbi = item as ToolboxItem;
  var image = tbi.Bitmap;
  </code></pre>
  
  <p>Where item can be any type of Control. It's working as it should be.</p>
  
  <p>The problem happens when I try to use custom controls in the toolbox. Let's say I create this class:</p>
  
  <pre><code>public class PMLButton : Button
  {
  }
  </code></pre>
  
  <p>Then when the PMLButton is passed on the 'item' variable it get the gear icon, of a custom control, as it should. But in this case I would like to show the default button icon for this item. </p>
  
  <p>All tools I'll use in the toolbox are derived from a default windows control class (Button, Label, Checkbox, etc). </p>
  
  <p>If I cast the 'item' variable to its base type, it would work correctly and show the right image. Is there any way of doing this?</p>