GrapeCity MultiRow Windows Forms Documentation
ThreeDBorder Constructor(Color,ThreeDEffect)
Example 


The base color used to calculate all the color properties automatically.
The three-dimensional effect.
Initializes a new instance of the ThreeDBorder class with the specified color and three-dimensional effect.
Syntax
Public Function New( _
   ByVal baseColor As Color, _
   ByVal effect As ThreeDEffect _
)
Dim baseColor As Color
Dim effect As ThreeDEffect
 
Dim instance As New ThreeDBorder(baseColor, effect)
public ThreeDBorder( 
   Color baseColor,
   ThreeDEffect effect
)

Parameters

baseColor
The base color used to calculate all the color properties automatically.
effect
The three-dimensional effect.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not a valid ThreeDEffect value.
Remarks
The properties DarkColor, DarkDarkColor, LightColor, and LightLightColor are calculated from the baseColor with the following code. DarkColor = ControlPaint.Dark(color); DarkDarkColor = ControlPaint.DarkDark(color); LightColor = ControlPaint.Light(color); LightLightColor = ControlPaint.LightLight(color);
Example
The following code example shows how to set a ThreeDBorder in the Section. This example is part of a larger example available for the Border class.
void setThreeDBorderToRow_Click(object sender, EventArgs e)
        {
            Template template1 = gcMultiRow1.Template;
            Row row = template1.Row;

            if (row.Border is ThreeDBorder)
            {
                row.Border = Border.Empty;
            }
            else
            {
                //Use this constructor to set the outline ThreeDBorder
                ThreeDBorder threeDBorder1 = new ThreeDBorder(Color.Gray, Color.DarkGray, Color.White, 
Color.LightGray);
                threeDBorder1.ThreeDEffect = ThreeDEffect.Raised;
                //Set ThreeDBorder to Row.
                row.Border = threeDBorder1;
            }

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

        If TypeOf row.Border Is ThreeDBorder Then
            row.Border = Border.Empty
        Else
            'Use this constructor to set the outline ThreeDBorder
            Dim threeDBorder1 As New ThreeDBorder(Color.Gray, Color.DarkGray, Color.White, Color.LightGray)
            threeDBorder1.ThreeDEffect = ThreeDEffect.Raised
            'Set ThreeDBorder to Row.
            row.Border = threeDBorder1
        End If

        ' 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

ThreeDBorder Class
ThreeDBorder Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.