This documentation is archived and is not being maintained.

ListView.BorderStyle Property

Gets or sets the border style of the control.

[Visual Basic]
Public Property BorderStyle As BorderStyle
public BorderStyle BorderStyle {get; set;}
public: __property BorderStyle get_BorderStyle();
public: __property void set_BorderStyle(BorderStyle);
public function get BorderStyle() : BorderStyle;
public function set BorderStyle(BorderStyle);

Property Value

One of the BorderStyle values. The default is BorderStyle.Fixed3D.


Exception Type Condition
InvalidEnumArgumentException The value specified is not one of the BorderStyle values.


You can use the BorderStyle property to change the border style of the ListView control to match the border style settings of other controls on the form. For example, if none of the other controls on your form displays a border, you can set the BorderStyle property of the ListView control to BorderStyle.None to match the other controls.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ListView Class | ListView Members | System.Windows.Forms Namespace | BorderStyle