GrapeCity MultiRow Windows Forms Documentation
ThreeDEffect Property
Example 


Gets or sets the three-dimensional effect.
Syntax
<DefaultValueAttribute()>
Public Property ThreeDEffect As ThreeDEffect
Dim instance As ThreeDBorder
Dim value As ThreeDEffect
 
instance.ThreeDEffect = value
 
value = instance.ThreeDEffect
[DefaultValue()]
public ThreeDEffect ThreeDEffect {get; set;}

Property Value

A ThreeDEffect value that represents the three-dimensional border effect. The default is ThreeDEffect.Raised.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not a valid ThreeDEffect value.
Remarks
If the effect is ThreeDEffect.Raised, the border uses the LightColor and LightLightColor properties to draw the top and left sides. DarkColor and DarkDarkColor are used to draw the bottom and right sides. If the effect is ThreeDEffect.Sunken, the border uses DarkColor and DarkDarkColor properties to draw the top and left sides. LightColor and LightLightColor are used to draw the bottom and right sides.
Example
The following code example shows how to set a ThreeDBorder in a Section. This example is part of a larger example available for the Border class.
void setThreeDBorderToCell_Click(object sender, EventArgs e)
       {
           Template template1 = gcMultiRow1.Template;

           Row row = template1.Row;

           ThreeDBorder threeDBorder1 = new ThreeDBorder();
           threeDBorder1.DarkColor = Color.Gray;
           threeDBorder1.DarkDarkColor = Color.DarkGray;
           threeDBorder1.LightColor = Color.White;
           threeDBorder1.LightLightColor = Color.LightGray;

           threeDBorder1.ThreeDEffect = ThreeDEffect.Sunken;

           row.Cells[0].Style.Border = threeDBorder1;

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

        Dim row As Row = template1.Row

        Dim threeDBorder1 As New ThreeDBorder()
        threeDBorder1.DarkColor = Color.Gray
        threeDBorder1.DarkDarkColor = Color.DarkGray
        threeDBorder1.LightColor = Color.White
        threeDBorder1.LightLightColor = Color.LightGray

        threeDBorder1.ThreeDEffect = ThreeDEffect.Sunken
        row.Cells(0).Style.Border = threeDBorder1

        ' 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

 

 


Copyright © GrapeCity, inc. All rights reserved.