Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void pbHeaderBar_Paint(object sender, PaintEventArgs e)
- {
- /*
- LinearGradientBrush gradientBrush =
- new LinearGradientBrush(new Point(0, 0), new Point(0, pbHeaderBar.Height), Color.Black, Color.Black);
- ColorBlend colorBlend = new ColorBlend();
- colorBlend.Positions = new float[] { 0, 1/3f, 2/3f, 1 };
- colorBlend.Colors = new Color[] { Color.Blue, Color.Green, Color.Red, Color.Blue };
- gradientBrush.InterpolationColors = colorBlend;
- e.Graphics.FillRectangle(gradientBrush, 0, 0, pbHeaderBar.Width, pbHeaderBar.Height);
- */
- /*
- Brush gradientBrush = new LinearGradientBrush(new Point(0, 0), new Point(0, pbHeaderBar.Height), Color.Black, Color.Blue);
- e.Graphics.FillRectangle(gradientBrush, 0, 0, pbHeaderBar.Width, pbHeaderBar.Height);
- */
- /*
- GraphicsPath gradientPath = new GraphicsPath();
- gradientPath.AddRectangle(new Rectangle(pbHeaderBar.Location, pbHeaderBar.Size));
- PathGradientBrush pathGradientBrush = new PathGradientBrush(gradientPath);
- pathGradientBrush.CenterColor = Color.Green;
- pathGradientBrush.SurroundColors = new[] { Color.Blue };
- e.Graphics.FillRectangle(pathGradientBrush, 0, 0, pbHeaderBar.Width, pbHeaderBar.Height);
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement