BorderStyle

Gets or sets the Border Style used to draw the control.

Syntax
c#
public BorderStyles BorderStyle{ get; set; }

Property Value
Type: SGBControls.Editors.BorderStyles
Default Value: BorderStyles.Flat

Remarks
The BorderStyle property is used to draw the borders around the control. To view possible border styles, please see the BorderStyles Topic.

The BorderStyle 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 BorderStyle of the control
// If the control has a valid SGBEditStyleController, change the BorderStyle of that.
public void SetBorderStyle(SGBBaseControl control)
{
    if(control != null)
    {
       if (control.StyleController != null)
           control.StyleController.BorderStyle = BorderStyles.Flat;
       else
           control.BorderColor = BorderStyles.Flat;
    }
}

vb.net
' Change the BorderStyle of the control 
' If the control has a valid SGBEditStyleController, change the BorderStyle of that. 
Public Sub SetBorderStyle(ByVal control As SGBBaseControl) 
    If control IsNot Nothing Then 
        If control.StyleController IsNot Nothing Then 
            control.StyleController.BorderStyle = BorderStyles.Flat
        Else 
            control.BorderStyle = BorderStyles.Flat
        End If 
    End If 
End Sub 

Known Issues
None

Last edited Mar 30, 2010 at 11:24 AM by scottgblood, version 2

Comments

No comments yet.