0

I am trying to create an image in C# using the Drawing classes. The image has a grid and I want to create a gradient header similar to this image.

enter image description here

Can I get some guidance on how to do this? I tried using the LinearGradientBrush but I am struggling to get the same header look as it is in the image above.

2
  • You're likely to have more success if you create two gradients, one for the top and one for the bottom. You are trying to get a skeuomorphic effect that approximates a half-round header, you can't do that using a linear effect Commented Aug 26, 2023 at 18:19
  • For the top half, create a LinearGradientBrush, pass the full bounds and two semi-transparent white colors (A < 100). .FillRectangle(x, y, width, height / 2);. Commented Aug 27, 2023 at 11:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.