Share via


WizardForm.TaskProgressStartColor Property

Definition

Gets or sets the starting color for the progress bar gradient.

public:
 property System::Drawing::Color TaskProgressStartColor { System::Drawing::Color get(); void set(System::Drawing::Color value); };
public System.Drawing.Color TaskProgressStartColor { get; set; }
member this.TaskProgressStartColor : System.Drawing.Color with get, set
Public Property TaskProgressStartColor As Color

Property Value

The Color structure that is used as the starting color of the progress bar gradient. The default color is [A=255, R=0, G=51, B=135], which is an integer value of -16764025.

Examples

The following example demonstrates the TaskProgressStartColor property. This example sets the value of the TaskProgressStartColor property to the color red. This code example is part of a larger example provided for the WizardForm class.

// Customize the StartTaskProgressMethod.
protected override void StartTaskProgress()
{
    TaskProgressStartColor = Color.Red;
    TaskProgressEndColor = Color.Yellow;
    // Default TaskProgressScrollSpeed is a value of 6.
    TaskProgressScrollSpeed = 2;
    // Default TaskProgressGradientSpeed is a value of 1;
    TaskProgressGradientSpeed = 3;
    //Set the task Glyph.
    TaskGlyph = Icon.FromHandle(Cursors.Arrow.Handle).ToBitmap();
    TaskGlyph.RotateFlip(RotateFlipType.Rotate90FlipNone);
    // Implement the StartTaskProgress from the base class.
    base.StartTaskProgress();
}
// Customize the StartTaskProgressMethod.
protected override void StartTaskProgress()
{
    TaskProgressStartColor = Color.Red;
    TaskProgressEndColor = Color.Yellow;
    // Default TaskProgressScrollSpeed is a value of 6.
    TaskProgressScrollSpeed = 2;
    // Default TaskProgressGradientSpeed is a value of 1;
    TaskProgressGradientSpeed = 3;
    //Set the task Glyph.
    TaskGlyph = Icon.FromHandle(Cursors.Arrow.Handle).ToBitmap();
    TaskGlyph.RotateFlip(RotateFlipType.Rotate90FlipNone);
    // Implement the StartTaskProgress from the base class.
    base.StartTaskProgress();
}

Remarks

The progress bar displays a color gradient that is defined by the values of the TaskProgressStartColor and TaskProgressEndColor property values. The TaskProgressStartColor property enables you to customize the starting color of the progress bar gradient. If the values of TaskProgressStartColor and the TaskProgressEndColor are equal, the progress bar appears as a solid line.

You can specify the value of this property as a system-defined color, such as Color.Red, or as a 32-bit ARGB value, such as Color.FromArgb(255,255,0,0) or Color.FromArgb(-65536).

Applies to