Adding lineargradientbrush inside graphicspath in c#
<p>hello how to fill lineargradientbrush on the graphicspath..<br>
i have this code and solidbrush can only fill it.. i dont know how to fill it with lineargradientbrush.. any help please..</p>

<p>i have this code..</p>

<pre><code>class KamoteButton : Button
{
    protected override void OnPaint(PaintEventArgs pevent)
    {
        int width = this.Width-1;
        int height = this.Height-1;
        Color gradColor_a = Color.FromArgb(162, 177, 183);
        Color gradColor_b = Color.FromArgb(104, 111, 114);
        int radius = this.Width / 8;


        Graphics gFx = pevent.Graphics;
        gFx.SmoothingMode = SmoothingMode.AntiAlias;
        GraphicsPath gp = new GraphicsPath();
        gp.AddArc(0, 0, radius, radius, 180, 90);
        gp.AddLine(width / 8, 0, width - width / 8, 0);
        gp.AddArc(width - radius, 0, radius, radius, 270, 90);
        gp.AddLine(width, width / 8, width, height - width / 8);
        gp.AddArc(width - radius, height - radius, radius, radius, 0, 90);
        gp.AddLine(width - width / 8, height, width / 8, height);
        gp.AddArc(0, height - radius, radius, radius, 90, 90);
        gp.AddLine(0, height - width / 8, 0, width / 8);
        Rectangle r = new Rectangle(0, 0, 100, 100);

        LinearGradientBrush lbg = new LinearGradientBrush(gp, gradColor_a, gradColor_b, LinearGradientMode.Vertical);

        SolidBrush sb = new SolidBrush(Color.Red);
        gFx.FillPath(lbg, gp);
        this.Region = new Region(gp);
    }
}
</code></pre>
