# ProgressBarPrimitive

**ProgressBarPrimitive** is a specialized descendant of the [FillPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/fillprimitive) that  indicates the state of progress in a long running process. The fill area is controlled by the **GradientStyle** and the **BackColor.BackColor4** properties. The fill covers the percentage area between **Minimum** and **Maximum** specified by the **Value1** property. **Value1** is rendered using up to all four colors. **Value2** displays in the **BackColor** at 25% opacity. **Orientation** controls the starting point of the fill and can originate from **Left**,  **Right**, **Top** or **Bottom**. The example below shows a Linear fill for  **Value1**(set to 20), and a pale Aqua for **Value2**(set to 70).

![Telerik UI for WinForms ProgressBarPrimitive showing primary and secondary progress values](https://www.telerik.com/products/winforms/documentation/assets/995c4c1adcb59c54e6bcb17a6752a46c/tpf-primitives-progressprimitive001.png)

#### Creating a ProgressBarPrimitive

 

 

```C#
public class MyProgressBarPrimitiveElement : RadElement
{
    protected override void CreateChildElements()
    {
        BorderPrimitive borderPrimitive = new BorderPrimitive();
        borderPrimitive.BoxStyle = BorderBoxStyle.OuterInnerBorders;
        borderPrimitive.GradientStyle = GradientStyles.Solid;
        borderPrimitive.ForeColor = Color.Blue;
        borderPrimitive.InnerColor = Color.LightSkyBlue;  
        ProgressBarPrimitive progressBarPrimitive = new ProgressBarPrimitive();
        progressBarPrimitive.GradientStyle = GradientStyles.Linear;
        progressBarPrimitive.NumberOfColors = 4;
        progressBarPrimitive.Orientation = ProgressOrientation.Left;
        progressBarPrimitive.Value1 = 20;
        progressBarPrimitive.Value2 = 70;
        progressBarPrimitive.Minimum = 1;
        progressBarPrimitive.Maximum = 100;
        progressBarPrimitive.BackColor = Color.Aqua;
        progressBarPrimitive.BackColor2 = Color.Blue;
        progressBarPrimitive.BackColor3 = Color.SkyBlue;
        progressBarPrimitive.BackColor4 = Color.LightSkyBlue;
        borderPrimitive.ZIndex = 1;
        this.Children.Add(borderPrimitive);
        this.Children.Add(progressBarPrimitive);
        base.CreateChildElements();
    }
}

```

```VB.NET
Public Class MyProgressBarPrimitiveElement
    Inherits RadElement
    Protected Overrides Sub CreateChildElements()
        Dim borderPrimitive As New BorderPrimitive()
        borderPrimitive.BoxStyle = BorderBoxStyle.OuterInnerBorders
        borderPrimitive.GradientStyle = GradientStyles.Solid
        borderPrimitive.ForeColor = Color.Blue
        borderPrimitive.InnerColor = Color.LightSkyBlue
        Dim progressBarPrimitive As New ProgressBarPrimitive()
        progressBarPrimitive.GradientStyle = GradientStyles.Linear
        progressBarPrimitive.NumberOfColors = 4
        progressBarPrimitive.Orientation = ProgressOrientation.Left
        progressBarPrimitive.Value1 = 20
        progressBarPrimitive.Value2 = 70
        progressBarPrimitive.Minimum = 1
        progressBarPrimitive.Maximum = 100
        progressBarPrimitive.BackColor = Color.Aqua
        progressBarPrimitive.BackColor2 = Color.Blue
        progressBarPrimitive.BackColor3 = Color.SkyBlue
        progressBarPrimitive.BackColor4 = Color.LightSkyBlue
        borderPrimitive.ZIndex = 1
        Me.Children.Add(borderPrimitive)
        Me.Children.Add(progressBarPrimitive)
        MyBase.CreateChildElements()
    End Sub
End Class

```



## See Also

* [ArrowPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/arrowprimitive)

* [BorderPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/borderprimitive)

* [CheckPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/checkprimitive)

* [FillPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/fillprimitive)

* [FocusPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/focusprimitive)

* [GripPrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/gripprimitive)

* [ImagePrimitive](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/imageprimitive)

* [ImageShape](https://www.telerik.com/products/winforms/documentation/telerik-presentation-framework/primitives/imageshape)
