Share via


WizardForm.TaskCaption Property

Definition

Gets or sets the caption of a task, wizard form, or other object.

public:
 property System::String ^ TaskCaption { System::String ^ get(); void set(System::String ^ value); };
public string TaskCaption { get; set; }
member this.TaskCaption : string with get, set
Public Property TaskCaption As String

Property Value

The caption text. The default is an empty string.

Examples

The following example sets the TaskCaption property value when the user is on a specific WizardPage object. This code example is part of a larger example provided for the WizardForm class.

// Customize the OnPageChanged method
protected override void  OnPageChanged(EventArgs e)
{
    // To get to the LabelPage the user has been validated.
    if (this.CurrentPage.Name == "demoModuleWizardLabelPage")
    {
        this.TaskCaption = "User is signed in";
    }
    base.OnPageChanged(e);
}
// Customize the OnPageChanged method
protected override void  OnPageChanged(EventArgs e)
{
    // To get to the LabelPage the user has been validated.
    if (this.CurrentPage.Name == "demoModuleWizardLabelPage")
    {
        this.TaskCaption = "User is signed in";
    }
    base.OnPageChanged(e);
}

Remarks

You can use this property to update the caption of the WizardForm object. The TaskCaption property contains a string that you can use wherever you need a caption, such as in the title bar of the wizard form.

Applies to