Home / AJAX

Ajax Control Toolkit RoundedCorners

RSS
Modified on 2010/04/16 01:07 by Stephen Walther Categorized as Uncategorized
The RoundedCorners extender applies rounded corners to existing elements. To accomplish this, it inserts elements before and after the element that is selected, so the overall height of the element will change slightly. You can choose which corners of the target panel should be rounded by setting the Corners property.

RoundedCorners Server Reference

The properties in italics are optional.

<ajaxToolkit:RoundedCornersExtender ID="rce" runat="server"
    TargetControlID="Panel1"
    Radius="6"
    Corners="All" />
  • TargetControlID - The ID of the control to extend.
  • Radius - The radius of the corners (and height of the added area). The default is 5.
  • Corners - The corners of the target panel that should be rounded (None, TopLeft, TopRight, BottomRight, BottomLeft, Top, Right, Bottom, Left, or All)

RoundedCorners Client Reference

Sys.Extended.UI.RoundedCornersBehavior Class

  • Summary - Rounds the corners of its target element.
  • Parameters - Sys.UI.DomElement element

Methods

  • initialize() - Initializes the RoundedCorners behavior.
  • dipose() - Disposes the RoundedCorners behavior.
  • update() - Creates the surrounding div element that has rounded corners.
  • disposeParentDiv() - Disposes the surrounding div element that has rounded corners.
  • getBackgroundColor() - Gets the background color of the target element.
  • moveChildren() - Moves the child nodes from one element to another.
    • Parameters - Sys.UI.DomElement src, Sys.UI.DomElement dest
  • isCornerSet(corner) - Checks whether the specified corner has been set.
    • Parameters - AjaxControlTooolkit.BoxCorners corner
    • Returns - true if the corner has been set; otherwise, false.
  • setCorner(corner, value) - Sets a corner that should be rounded.
    • Parameters - Sys.Extended.UI.BoxCorners corner, Boolean value
    • Remarks - Set the value parameter to true to set the corner as rounded. Set the value parameter to false to clear the rounded corner setting.

Properties

  • Color - Gets or sets a string that contains the background color of the rounded corner areas. By default, this property gets the background color of the panel that it is attached to.
  • Radius - Gets or sets an integer value that specifies the radius of the corners (and the height of the added area). The default is 5.
  • Corners - Gets or sets a Sys.Extended.UI.BoxCorners object that specifies which corners should be rounded.
  • BorderColor - Gets or sets a string that contains the color of the border and therefore of the rounded corners.

Sys.Extended.UI.BoxCorners Enum

  • Summary - Defines the corners of an element to apply rounding to.

Fields

  • None : 0x00
  • TopLeft : 0x01
  • TopRight : 0x02
  • BottomRight : 0x04
  • BottomLeft : 0x08
  • Top : 0x01 | 0x02
  • Right : 0x02 | 0x04
  • Bottom : 0x04 | 0x08
  • Left : 0x08 | 0x01
  • All : 0x01 | 0x02 | 0x04 | 0x08