PanelContainerDesigner.FrameCaption Propriedade
Definição
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 da propriedade
Uma cadeia de caracteres que contém a legenda do painel.A string that contains the panel caption.
Exemplos
O exemplo de código a seguir mostra como substituir a FrameCaption propriedade em uma classe que é herdada da PanelContainerDesigner classe para alterar a aparência de um controle que é derivado da Panel classe em tempo de design.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. O exemplo fornece uma legenda padrão para o controle associado, se nenhum tiver sido definido.The example provides a default caption for the associated control, if none was defined.
// 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
Comentários
A FrameCaption propriedade retorna a GroupingText Propriedade do controle associado Panel .The FrameCaption property returns the GroupingText property of the associated Panel control.