End Google Ads 201810 - BS.net 01 --> Hello,

I am having an enumerator problem while making a custom panel user control. The control extends the System.Windows.Forms.Panel with properties to allow a user to draw a background gradients and rounded border edges.

I use a bit wise enumerator to control which rounded corners are drawn on the border. This all works fine until i make a public property that is accessible in the visual studio designer. The designer will display the default setting when the control is added to a form, but when you change the value of the property it crashes visual studio.

---

The enum...

public enum RectangleCorners
{
None = 0,
TopLeft = 1, TopRight = 2, BottomLeft = 4, BottomRight = 8,
All = TopLeft | TopRight | BottomLeft | BottomRight
}

---

the implementation...

using System;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace Ez_Backup.UserControls
{
public class Panel : System.Windows.Forms.Panel
{
private RoundedRectangle.RectangleCorners pRoundedBorderCorners;

public RoundedRectangle.RectangleCorners RoundedBorderCorners
{
get {
return pRoundedBorderCorners;
}
set {
RoundedBorderCorners = value;
base.*******();
}
}
}
}

I believe i possibly may be required to add some type of designer attribute. After an hour of google action I am here.

Please help me.

Thanks