1
Vote

ContextMenu BackColor fix

description

First of all, Great job!
For thus of you who uses the XGrid and ContextMenu together one will notice that the BackColor on the ContextMenu doesn't work. In Visual Studio 2005 working with asp.net in a Webform with both custom component XGrid and ContextMenu. The Designer always switching the BackColor to #eeeee (default) on the ContextMenu and ignore the BackColor attribute. Via the XGrid SourceCode the fix can be made in ContextMenu.cs in function CreateControlStyle:
        protected override Style CreateControlStyle()
        {
            Style style = base.CreateControlStyle();
            style.BorderStyle = BorderStyle.Outset;
            style.BorderColor = Color.Snow;
            style.BorderWidth = Unit.Pixel(2);
            if (BackColor == Color.Empty) {
                style.BackColor = Color.FromName("#eeeeee");
            } else {
                style.BackColor = BackColor;
            }
            style.Font.Name = "verdana";
            style.Font.Size = FontUnit.Point(8);
            return style;
        }
The problem is solved. Hope this will come in the next release.

file attachments

comments