Class RadProgressBarElement
Represents a progress bar element. RadProgressBar is a simple wrapper for RadProgressBarElement. The latter may be included in other telerik controls. All graphical and logic functionality is implemented by RadProgressBarElement. The RadProgressBar acts to transfer the events to and from its RadProgressBarElement instance.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[ComVisible(false)]
public class RadProgressBarElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadProgressBarElement()
Declaration
public RadProgressBarElement()
Fields
DashProperty
Identifies the Dash dependency property.
Declaration
public static RadProperty DashProperty
Field Value
RadProperty
|
HatchProperty
Identifies the Hatch dependency property.
Declaration
public static RadProperty HatchProperty
Field Value
RadProperty
|
IntegralDashProperty
Identifies the IntegralDash dependency property.
Declaration
public static RadProperty IntegralDashProperty
Field Value
RadProperty
|
IsVerticalProperty
Identifies the IsVertical dependency property.
Declaration
public static RadProperty IsVerticalProperty
Field Value
RadProperty
|
MaximumProperty
Identifies the Maximum dependency property.
Declaration
public static RadProperty MaximumProperty
Field Value
RadProperty
|
MinimumProperty
Identifies the Minimum dependency property.
Declaration
public static RadProperty MinimumProperty
Field Value
RadProperty
|
ProgressOrientationProperty
Identifies the ProgressOrientation dependency property.
Declaration
public static RadProperty ProgressOrientationProperty
Field Value
RadProperty
|
ShowProgressIndicatorsProperty
Identifies the ShowProgressIndicators dependency property.
Declaration
public static RadProperty ShowProgressIndicatorsProperty
Field Value
RadProperty
|
StepProperty
Identifies the Step dependency property.
Declaration
public static RadProperty StepProperty
Field Value
RadProperty
|
ValueProperty1
Identifies the Value1 dependency property.
Declaration
public static RadProperty ValueProperty1
Field Value
RadProperty
|
ValueProperty2
Identifies the Value2 dependency property.
Declaration
public static RadProperty ValueProperty2
Field Value
RadProperty
|
Properties
Dash
Gets or sets whether the progress bar uses dash style rendering where the progress line is broken into segments with separators.
Declaration
public bool Dash { get; set; }
Property Value
System.Boolean
|
Hatch
Gets or sets whether the progress bar uses hatch style rendering where the progress line is covered with a hatch pattern.
Declaration
public bool Hatch { get; set; }
Property Value
System.Boolean
|
Image
Gets or sets the image displayed in the progress indicator area.
Declaration
public override Image Image { get; set; }
Property Value
System.Drawing.Image
|
Overrides
ImageAlignment
Gets or sets the alignment of the image within the progress indicator area.
Declaration
public override ContentAlignment ImageAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment
|
Overrides
ImageIndex
Gets or sets the index of the image from the associated System.Windows.Forms.ImageList to display in the progress indicator.
Declaration
public override int ImageIndex { get; set; }
Property Value
System.Int32
|
Overrides
ImageKey
Gets or sets the key of the image from the associated System.Windows.Forms.ImageList to display in the progress indicator.
Declaration
public override string ImageKey { get; set; }
Property Value
System.String
|
Overrides
ImageLayout
Gets or sets the layout mode for the image in the progress indicator area.
Declaration
public override ImageLayout ImageLayout { get; set; }
Property Value
System.Windows.Forms.ImageLayout
|
Overrides
IndicatorElement1
Gets an instance of the UpperProgressIndicatorElement class that represents the progress indicator of the progress bar.
Declaration
public UpperProgressIndicatorElement IndicatorElement1 { get; }
Property Value
UpperProgressIndicatorElement
|
IndicatorElement2
Gets an instance of the ProgressIndicatorElement class that represents the progress bar indicator.
Declaration
public ProgressIndicatorElement IndicatorElement2 { get; }
Property Value
ProgressIndicatorElement
|
IntegralDash
Gets or sets whether dash-style progress indicators move in discrete steps rather than smoothly. Requires Dash to be set to true.
Declaration
public bool IntegralDash { get; set; }
Property Value
System.Boolean
|
Maximum
Gets or sets the maximum possible value for the progress bar Value1(2).
Declaration
public int Maximum { get; set; }
Property Value
System.Int32
|
Minimum
Gets or sets the minimum possible value for the progress bar Value1(2).
Declaration
public int Minimum { get; set; }
Property Value
System.Int32
|
ProgressOrientation
Gets or sets the progress orientation determining the direction of progress flow: Bottom, Left, Right, or Top.
Declaration
public ProgressOrientation ProgressOrientation { get; set; }
Property Value
ProgressOrientation
|
SeparatorColor1
Gets or sets the first gradient color used for separator rendering in multi-color gradient separators.
Declaration
public Color SeparatorColor1 { get; set; }
Property Value
System.Drawing.Color
|
SeparatorColor2
Gets or sets the second gradient color used for separator rendering in multi-color gradient separators.
Declaration
public Color SeparatorColor2 { get; set; }
Property Value
System.Drawing.Color
|
SeparatorColor3
Gets or sets the third gradient color used for separator rendering in multi-color gradient separators.
Declaration
public Color SeparatorColor3 { get; set; }
Property Value
System.Drawing.Color
|
SeparatorColor4
Gets or sets the fourth gradient color used for separator rendering in multi-color gradient separators.
Declaration
public Color SeparatorColor4 { get; set; }
Property Value
System.Drawing.Color
|
SeparatorGradientAngle
Gets or sets the angle in degrees for the gradient direction used in separator rendering.
Declaration
public int SeparatorGradientAngle { get; set; }
Property Value
System.Int32
|
SeparatorGradientPercentage1
Gets or sets the first color stop position in the separator gradient as a percentage from 0.0 to 1.0.
Declaration
public float SeparatorGradientPercentage1 { get; set; }
Property Value
System.Single
|
SeparatorGradientPercentage2
Gets or sets the second color stop position in the separator gradient as a percentage from 0.0 to 1.0.
Declaration
public float SeparatorGradientPercentage2 { get; set; }
Property Value
System.Single
|
SeparatorNumberOfColors
Gets or sets the number of colors used in the separator gradient rendering.
Declaration
public int SeparatorNumberOfColors { get; set; }
Property Value
System.Int32
|
SeparatorsElement
Gets an instance of the SeparatorsElement class that represents the separators on the progress bar indicator.
Declaration
public SeparatorsElement SeparatorsElement { get; }
Property Value
SeparatorsElement
|
SeparatorWidth
Gets or sets the separators width in pixels.
Declaration
public int SeparatorWidth { get; set; }
Property Value
System.Int32
|
ShowProgressIndicators
Gets or sets whether the progress should be displayed with percentage indicators in the text.
Declaration
public bool ShowProgressIndicators { get; set; }
Property Value
System.Boolean
|
Step
Gets or sets the value with which the progress bar Value1(2) will increments/decrements.
Declaration
public int Step { get; set; }
Property Value
System.Int32
|
StepWidth
Gets or sets the step width in pixels used for dash-style progress indicators to determine segment spacing.
Declaration
public int StepWidth { get; set; }
Property Value
System.Int32
|
SweepAngle
Gets or sets the angle in degrees at which dash or hatch lines are tilted for visual styling effects.
Declaration
public int SweepAngle { get; set; }
Property Value
System.Int32
|
Text
Gets or sets the text content displayed in the progress bar.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
TextElement
Gets the text element that manages the display of text content within the progress bar.
Declaration
public ProgressBarTextElement TextElement { get; }
Property Value
ProgressBarTextElement
|
Value1
Declaration
public int Value1 { get; set; }
Property Value
System.Int32
|
Value2
Declaration
public int Value2 { get; set; }
Property Value
System.Int32
|
Methods
ArrangeOverride(SizeF)
Arranges the child elements of the RadProgressBarElement within the specified final size.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final area within which to arrange the element and its children. |
Returns
System.Drawing.SizeF
The actual size that was used for arrangement. |
Overrides
CallCreateChildElements()
Creates and initializes the child elements that make up the progress bar structure including indicators, separators, and text element.
Declaration
protected override void CallCreateChildElements()
Overrides
DecrementValue1(Int32)
Decrements the first progress indicator value by the specified amount.
Declaration
public void DecrementValue1(int value)
Parameters
System.Int32
value
The amount to subtract from the current Value1. |
DecrementValue2(Int32)
Decrements the second progress indicator value by the specified amount.
Declaration
public void DecrementValue2(int value)
Parameters
System.Int32
value
The amount to subtract from the current Value2. |
GetHorizontalProgressIndicatorFinalSize(RectangleF, Int32, Int32)
Calculates the final size and position for a horizontal progress indicator based on the current value.
Declaration
protected RectangleF GetHorizontalProgressIndicatorFinalSize(RectangleF clientRect, int value, int step)
Parameters
System.Drawing.RectangleF
clientRect
The available client rectangle. |
System.Int32
value
The current progress value. |
System.Int32
step
The step size for dash-style indicators. |
Returns
System.Drawing.RectangleF
The calculated rectangle for the horizontal progress indicator. |
GetProgressIndicatorFinalSize(ProgressIndicatorElement, RectangleF, Int32)
Calculates the final size and position of a progress indicator based on its value and the available client area.
Declaration
protected RectangleF GetProgressIndicatorFinalSize(ProgressIndicatorElement element, RectangleF clientRect, int value)
Parameters
ProgressIndicatorElement
element
The progress indicator element to calculate size for. |
System.Drawing.RectangleF
clientRect
The available client rectangle for the indicator. |
System.Int32
value
The current progress value to determine the indicator size. |
Returns
System.Drawing.RectangleF
The calculated rectangle for the progress indicator. |
GetSeparatorsFinalSize(RectangleF, RectangleF)
Determines the final size for the separators element based on the larger of the two progress indicator rectangles.
Declaration
protected RectangleF GetSeparatorsFinalSize(RectangleF progressBar1Rectangle, RectangleF progressBar2Rectangle)
Parameters
System.Drawing.RectangleF
progressBar1Rectangle
The progress bar1 rectangle. |
System.Drawing.RectangleF
progressBar2Rectangle
The progress bar2 rectangle. |
Returns
System.Drawing.RectangleF
|
GetVerticalProgressIndicatorFinalSize(RectangleF, Int32, Int32)
Calculates the final size and position for a vertical progress indicator based on the current value.
Declaration
protected RectangleF GetVerticalProgressIndicatorFinalSize(RectangleF clientRect, int value, int step)
Parameters
System.Drawing.RectangleF
clientRect
The available client rectangle. |
System.Int32
value
The current progress value. |
System.Int32
step
The step size for dash-style indicators. |
Returns
System.Drawing.RectangleF
The calculated rectangle for the vertical progress indicator. |
IncrementValue1(Int32)
Increments the first progress indicator value by the specified amount.
Declaration
public void IncrementValue1(int value)
Parameters
System.Int32
value
The amount to add to the current Value1. |
IncrementValue2(Int32)
Increments the second progress indicator value by the specified amount.
Declaration
public void IncrementValue2(int value)
Parameters
System.Int32
value
The amount to add to the current Value2. |
InitializeFields()
Initializes the default field values and visual properties for the progress bar element.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the desired size of the RadProgressBarElement and its child elements based on the available space.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The available size for the element to use during layout. |
Returns
System.Drawing.SizeF
The desired size needed to display the element and all its content. |
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Handles property changes for the progress bar element and updates the visual state accordingly.
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
The event data containing information about the property that changed. |
Overrides
PerformStepBackValue1()
Decreases the current position of the first progress indicator by the amount specified in the Step property.
Declaration
public void PerformStepBackValue1()
PerformStepBackValue2()
Decreases the current position of the second progress indicator by the amount specified in the Step property.
Declaration
public void PerformStepBackValue2()
PerformStepValue1()
Advances the current position of the first progress indicator by the amount specified in the Step property.
Declaration
public void PerformStepValue1()
PerformStepValue2()
Advances the current position of the second progress indicator by the amount specified in the Step property.
Declaration
public void PerformStepValue2()