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 on the extender to None, TopLeft, TopRight, BottomRight, BottomLeft, Top, Right, Bottom, Left, or All.
RoundedCornersExtender Properties:-
1.TargetControlID :- The ID of the control to extend.
2. Radius: - The radius of the corners (and height of the added area). The default is 5.
3. Corners :- The corners of the target panel that should be rounded (None, TopLeft, TopRight, BottomRight, BottomLeft, Top, Right, Bottom, Left, or All)
4. BorderColor: - Gets or sets a string that contains the color of the border and therefore of the rounded corners.
5. 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.
Example:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoundedCornersExtender.aspx.cs" Inherits="RoundedCornersExtender" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<div>
<h3>Using BorderCornersExtender</h3>
<hr />
<asp:Panel ID="Panel1" runat="server" Width="300" Height="200" BackColor="Aqua"> </asp:Panel>
<asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="Panel1" Radius="20" Corners="All" BorderColor="Blue">
</asp:RoundedCornersExtender>
</div>
</form>
Output:-
RoundedCornersExtender Properties:-
1.TargetControlID :- The ID of the control to extend.
2. Radius: - The radius of the corners (and height of the added area). The default is 5.
3. Corners :- The corners of the target panel that should be rounded (None, TopLeft, TopRight, BottomRight, BottomLeft, Top, Right, Bottom, Left, or All)
4. BorderColor: - Gets or sets a string that contains the color of the border and therefore of the rounded corners.
5. 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.
Example:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoundedCornersExtender.aspx.cs" Inherits="RoundedCornersExtender" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<div>
<h3>Using BorderCornersExtender</h3>
<hr />
<asp:Panel ID="Panel1" runat="server" Width="300" Height="200" BackColor="Aqua"> </asp:Panel>
<asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="Panel1" Radius="20" Corners="All" BorderColor="Blue">
</asp:RoundedCornersExtender>
</div>
</form>
Output:-
No comments:
Post a Comment