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 static Color DefaultBorderColor { get; }
public:
[BrowsableAttribute(false)]
property Color DefaultBorderColor {
static Color get();
}
[<BrowsableAttribute(false)>]
static member DefaultBorderColor : Color with get
<BrowsableAttribute(False)>
Public Shared ReadOnly Property DefaultBorderColor As 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.
foreach (Microsoft.VisualBasic.PowerPacks.Shape s in this.shapeContainer1.Shapes)
{
if (s.BorderColor != Microsoft.VisualBasic.PowerPacks.SimpleShape.DefaultBorderColor)
{
s.BorderColor = Color.Black;
}
}
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
See Also
Shape Class
Microsoft.VisualBasic.PowerPacks Namespace
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)
Return to top