مشاركة عبر


Shape.DefaultBorderColor Property

Gets the default border color for a line or shape control.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'إقرار
<BrowsableAttribute(False)> _
Public Shared ReadOnly Property DefaultBorderColor As Color
    Get
'الاستخدام
Dim value As Color

value = Shape.DefaultBorderColor
[BrowsableAttribute(false)]
public static Color DefaultBorderColor { get; }
[BrowsableAttribute(false)]
public:
static property Color DefaultBorderColor {
    Color get ();
}
[<BrowsableAttribute(false)>]
static member DefaultBorderColor : Color
static function get DefaultBorderColor () : Color

Property Value

Type: System.Drawing.Color
The default border Color of the control. The default is DefaultForeColor.

Remarks

This is the default BorderColor property value of a nonparented Shape. Derived classes can have other defaults.

Examples

The following example demonstrates how to return the DefaultBorderColor and change the BorderColor based on the return value.

For Each s As Microsoft.VisualBasic.PowerPacks.Shape In Me.ShapeContainer1.Shapes
    If s.BorderColor <> Microsoft.VisualBasic.PowerPacks.SimpleShape.DefaultBorderColor Then
        s.BorderColor = Color.Black
    End If
Next
foreach (Microsoft.VisualBasic.PowerPacks.Shape s in this.shapeContainer1.Shapes)
{
    if (s.BorderColor != Microsoft.VisualBasic.PowerPacks.SimpleShape.DefaultBorderColor)
    {
        s.BorderColor = Color.Black;
    }
}

.NET Framework Security

See Also

Reference

Shape Class

Shape Members

Microsoft.VisualBasic.PowerPacks Namespace

Other Resources

How to: Draw Lines with the LineShape Control (Visual Studio)

How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)

Introduction to the Line and Shape Controls (Visual Studio)