WizardPage.Caption Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the caption of a form, wizard page, or other object.
public:
property System::String ^ Caption { System::String ^ get(); void set(System::String ^ value); };
public string Caption { get; set; }
member this.Caption : string with get, set
Public Property Caption As String
Property Value
The caption text. The default is an empty string.
Examples
The following example demonstrates the Caption property. This example sets the caption to specific string value. This code example is part of a larger example provided for the WizardPage class.
protected override void Activate()
{
_description = this.Name;
_caption = "Original Caption";
this.button4.Text = "Change R to L Layout : currently " + RightToLeft.ToString();
}
// Customize the Caption Property.
public new string Caption
{
get
{
return _caption;
}
set
{
_caption = value;
}
}
// The Caption button is clicked.
private void button2_Click(object sender, EventArgs e)
{
Caption = "Caption Modified";
}
Remarks
You should use this property to update the caption of the WizardPage object. The Caption property contains a string that is shown in the caption in the wizard form. You can use this string wherever you need a caption, such as in the title bar of the form that contains the wizard page or in the WizardPage control.