Indicates the border style for the control.
Namespace:
System.Windows.Forms
Assembly:
System.Windows.Forms (in System.Windows.Forms.dll)
Visual Basic (Declaration)
Public Property BorderStyle As BorderStyle
Dim instance As Panel
Dim value As BorderStyle
value = instance.BorderStyle
instance.BorderStyle = value
public BorderStyle BorderStyle { get; set; }
public:
property BorderStyle BorderStyle {
BorderStyle get ();
void set (BorderStyle value);
}
public function get BorderStyle () : BorderStyle
public function set BorderStyle (value : BorderStyle)
By default, the Panel control is displayed without a border. You can use this property to distinguish the boundaries of the Panel control from other areas on the form.
The following code example creates a Panel control with a three-dimensional border.
Public Sub CreateMyPanel()
Dim panel1 As New Panel()
' Initialize the Panel control.
panel1.Location = New Point(56, 72)
panel1.Size = New Size(264, 152)
' Set the Borderstyle for the Panel to three-dimensional.
panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
End Sub
public void CreateMyPanel()
{
Panel panel1 = new Panel();
// Initialize the Panel control.
panel1.Location = new Point(56,72);
panel1.Size = new Size(264, 152);
// Set the Borderstyle for the Panel to three-dimensional.
panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
}
public:
void CreateMyPanel()
{
Panel^ panel1 = gcnew Panel;
// Initialize the Panel control.
panel1->Location = Point(56,72);
panel1->Size = System::Drawing::Size( 264, 152 );
// Set the Borderstyle for the Panel to three-dimensional.
panel1->BorderStyle = System::Windows::Forms::BorderStyle::Fixed3D;
}
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Reference