title: How to set label backColor on gradient background panel
body: <p>Background Color of the panel control is set to color gradient.</p>
  
  <p>and i want to set same panel backcolor and label pack color</p>
  
  <p>my code is same below</p>
  
  <pre><code>private void panel1_Paint(object sender, PaintEventArgs e)
          {
              Graphics g = panel1.CreateGraphics();
              LinearGradientBrush lgb = new LinearGradientBrush(new Rectangle(0, 0, this.panel1.Width, this.panel1.Height), Color.Black, Color.Black, LinearGradientMode.Horizontal);
              ColorBlend cb = new ColorBlend();
              cb.Colors = new Color[] { Color.Black, Color.White };
              cb.Positions = new Single[] { 0.0F, 1.0F };
              lgb.InterpolationColors = cb;
  
              g.FillRectangle(lgb, new Rectangle(0, 0, this.panel1.Width, this.panel1.Height));
              label1.Parent = panel1;
              label1.BackColor = Color.Transparent;
              lgb.Dispose();
              g.Dispose();
  
          }
  </code></pre>
  
  <p>Which part was wrong?</p>