2012年3月21日水曜日

RoundedCorners

Let's have a panel with rounded corners:

Panel panel1 = new Panel();
panel1.ID = "panel1";
panel1.CssClass = "panel1";
panel1.Controls.Add(new LiteralControl("hello"));
Controls.Add(panel1);
AjaxControlToolkit.RoundedCornersExtender rcex = new AjaxControlToolkit.RoundedCornersExtender();
rcex.TargetControlID = panel1.ID;
Controls.Add(rcex);

css:

.panel1 { background-color : Lime; }

This works fine, until i set a radius:

rcex.Radius = 10;

Now the panel changes it's background-color to transparent after page loads completly. This color change magically disappears when i set a style related property on panel, for example

panel1.BorderStyle = BorderStyle.None;

This happens also with:

HtmlGenericControl panel1 = new HtmlGenericControl("div");
panel1.ID = "panel1";
panel1.Attributes["class"] = "panel1";
panel1.InnerText = "hello";
panel1.Style["border-style"] = "none"; // workaround?


The Question: What's going on?

This sounds like a bug. Could you please enter the issue athttp://www.codeplex.com/AtlasControlToolkit/WorkItem/List.aspx?

Thanks!

0 件のコメント:

コメントを投稿