GrapeCity MultiRow Windows Forms Documentation
TopRightCornerRadius Property
Example 


Gets or sets the radius for the top right corner.
Syntax
<RefreshPropertiesAttribute(RefreshProperties.All)>
Public Property TopRightCornerRadius As Single
Dim instance As RoundedBorder
Dim value As Single
 
instance.TopRightCornerRadius = value
 
value = instance.TopRightCornerRadius
[RefreshProperties(RefreshProperties.All)]
public float TopRightCornerRadius {get; set;}

Property Value

A System.Single value that indicates the radius, in percent of the shortest side, used for the top right corner. The default is 0f.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionThe value is less than 0f or more than 0.5f.
Example
The following code example shows how to set the border corner radius. This example is part of a larger example available for the Border class.
void setRoundedBorderCornerRadiusToCell_Click(object sender, EventArgs e)
        {
            Template template1 = gcMultiRow1.Template;

            RoundedBorder roundedBorder1 = new RoundedBorder(LineStyle.Medium, Color.Red);
            //Only set the TopLeftCorner and TopRightCorner.
            roundedBorder1.TopLeftCornerRadius = 0.3f;
            roundedBorder1.TopRightCornerRadius = 0.3f;
            template1.Row.Cells[0].Style.Border = roundedBorder1;

            // Reload template1.
            this.gcMultiRow1.Template = template1;
        }
Private Sub setRoundedBorderCornerRadiusToCell_Click(ByVal sender As Object, ByVal e As EventArgs) Handles 
setRoundedBorderCornerRadiusToCell.Click
        Dim template1 As Template = gcMultiRow1.Template

        Dim roundedBorder1 As New RoundedBorder(LineStyle.Medium, Color.Red)
        'Only set the TopLeftCorner and TopRightCorner.
        roundedBorder1.TopLeftCornerRadius = 0.3F
        roundedBorder1.TopRightCornerRadius = 0.3F
        template1.Row.Cells(0).Style.Border = roundedBorder1

        ' Reload template1.
        Me.gcMultiRow1.Template = template1
    End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RoundedBorder Class
RoundedBorder Members
AllCornerRadius Property
TopLeftCornerRadius Property
BottomLeftCornerRadius Property
BottomRightCornerRadius Property

 

 


Copyright © GrapeCity, inc. All rights reserved.