Share via


PanelContainerDesigner.FrameCaption Propiedad

Definición

Obtiene la leyenda que aparece en el control Panel asociado.

public:
 virtual property System::String ^ FrameCaption { System::String ^ get(); };
public override string FrameCaption { get; }
member this.FrameCaption : string
Public Overrides ReadOnly Property FrameCaption As String

Valor de propiedad

Cadena que contiene la leyenda del panel.

Ejemplos

En el ejemplo de código siguiente se muestra cómo invalidar la FrameCaption propiedad en una clase que se hereda de la PanelContainerDesigner clase para cambiar la apariencia de un control derivado de la Panel clase en tiempo de diseño. En el ejemplo se proporciona un título predeterminado para el control asociado, si no se ha definido ninguno.

// Provide a design-time caption for the panel.
public override string FrameCaption 
{
    get
    {
        // If the FrameCaption is empty, use the panel control ID.
        string localCaption = base.FrameCaption;
        if (localCaption == null || localCaption == "")
            localCaption = ((Panel)Component).ID.ToString();

        return localCaption;
    }
} // FrameCaption
' 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

Comentarios

La FrameCaption propiedad devuelve la GroupingText propiedad del control asociado Panel .

Se aplica a

Consulte también