BorderColor

Gets or sets the Color used to draw borders on this control.

Syntax
c#
public Color BorderColor{ get; set; }

Property Value
Type: System.Drawing.Color
Default Value: System.Drawing.SystemColors.WindowFrame

Remarks
The BorderColor property only takes effect when the BorderStyle property is set to either Flat or Gradient.

The BorderColor property can be set directly in the control or via the StyleController property of the control. When used directly in the control this propery has no effect if the StyleController property is set to a valid SGBEditStyleController object.

Examples

c#
// Change the BorderColor of the control
// If the control has a valid SGBEditStyleController, change the BorderColor of that.
public void SetBorderColor(SGBBaseControl control)
{
    if(control != null)
    {
       if (control.StyleController != null)
           control.StyleController.BorderColor = Color.Black;
       else
           control.BorderColor = Color.Black;
    }
}

vb.net
' Change the BorderColor of the control 
' If the control has a valid SGBEditStyleController, change the BorderColor of that. 
Public Sub SetBorderColor(ByVal control As SGBBaseControl) 
    If control IsNot Nothing Then 
        If control.StyleController IsNot Nothing Then 
            control.StyleController.BorderColor= Color.Black 
        Else 
            control.BorderColor= Color.Black
        End If 
    End If 
End Sub 

Known Issues
None

Last edited Mar 30, 2010 at 9:31 AM by scottgblood, version 2

Comments

No comments yet.