title: any idea on how to create a shadow for c# winforms control
body: <p>Dose any one have an idea on how to make a shadow for a c# winforms control, i know that this question was around for a long time, and there is a lot of complicated answers out there, if we can create a function that you give it a control as parameter and draw a shadow for that control,</p>
  
  <pre><code>public static void DrawShadow(Control control, Graphics g, Color shadowColor, ShadowDepth depth) //ShadowDepth is an enum
  {
      switch (depth)
      {
          case ShadowDepth.z_depth_1:
              DrawShadow(control, g, shadowColor, 1); // 1px shadow
              break;
          case ShadowDepth.z_depth_2:
              DrawShadow(control, g, shadowColor, 2); // 2px shadow
              break;
          case ShadowDepth.z_depth_3:
              DrawShadow(control, g, shadowColor, 3); // 3px shadow
              break;
          case ShadowDepth.z_depth_4:
              DrawShadow(control, g, shadowColor, 4); // 4px shadow
              break;
          case ShadowDepth.z_depth_5:
              DrawShadow(control, g, shadowColor, 5); // 5px shadow
              break;
      }
  }
  
  private static void DrawShadow(Control control, Graphics g, Color shadowColor, int depth)
  {
  
  }
  </code></pre>
  
  <p>so that we can get result like this:
  <a href="https://i.stack.imgur.com/MNCh4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MNCh4.png" alt="shadow depth"></a></p>
  
  <p>any ideas on how can we approach that</p>