PanelContainerDesigner.FrameCaption Property

 

Gets the caption that appears on the associated Panel control.

Namespace:   System.Web.UI.Design.WebControls
Assembly:  System.Design (in System.Design.dll)

Public Overrides ReadOnly Property FrameCaption As String

Property Value

Type: System.String

A string that contains the panel caption.

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
Return to top
Show: