The C1ProgressBar control contains a minimum value, a maximum value, and a value. In this topic, you will change the value of the MinValue, MaxValue, and Value properties from their defaults (0, 100, and 0 respectively) in Design view, in Source view, and in code.
Setting Values in Design View
Complete the following steps:
1.Click the Design button to enter Design view.
2. Right-click the C1ProgressBar control to open its context menu and select Properties. The Properties window opens with the C1ProgressBar control's properties in focus.
3. In the Properties window, set the following properties:
4. Press F5 to run the project and observe that the progress indicator has progressed along a quarter of the task bar. It has increased by a quarter because the control's value (150) is one-quarter of the way between the minimum value (100) and the maximum value (300).
Setting Values in Source view
Complete the following steps:
<cc1:C1ProgressBar>
tag so that the markup resembles the following:<cc1:C1ProgressBar ID="C1ProgressBar1" runat="server" ToolTip="Maximum value: {5}" LabelFormatString="{0}" MaximumValue="300" MinimumValue="100" Value="150" />
Setting Values in Code
Complete the following steps:
Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1ProgressBar1.MaxValue = 300 |
C#
C# |
Copy Code
|
---|---|
C1ProgressBar1.MaxValue = 300; |
Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1ProgressBar1.MinValue = 100 |
C#
C# |
Copy Code
|
---|---|
C1ProgressBar1.MinValue = 100; |
Visual Basic
Visual Basic |
Copy Code
|
---|---|
C1ProgressBar1.Value = 150 |
C#
C# |
Copy Code
|
---|---|
C1ProgressBar1.Value = 150; |