PanelContainerDesigner.FrameCaption Property
.NET Framework (current version)
Gets the caption that appears on the associated Panel control.
Assembly: System.Design (in System.Design.dll)
The FrameCaption property returns the GroupingText property of the associated Panel control.
The following code example shows how to override the FrameCaption property in a class that is inherited from the PanelContainerDesigner class to change the appearance of a control that is derived from the Panel class at design time. The example provides a default caption for the associated control, if none was defined.
' Provide a design-time caption for the panel. Public Overrides ReadOnly Property FrameCaption() As String Get ' If the FrameCaption is empty, use the panel control ID. Dim localCaption As String = MyBase.FrameCaption If localCaption Is Nothing Or localCaption = "" Then localCaption = CType(Component, Panel).ID.ToString() End If Return localCaption End Get End Property ' FrameCaption
.NET Framework
Available since 2.0
Available since 2.0
Show: