Table of Contents

Class StdProgressBar

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Represents a standard progress bar control that visually indicates the progress of a task.

[DefaultBindingProperty("Value")]
[ControlCategory("Common")]
public class StdProgressBar : GenericBorder, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, ILayoutItem, INotifyDataErrorInfo
Inheritance
StdProgressBar
Implements

Constructors

StdProgressBar()

Initializes a new instance of the StdProgressBar class.

StdProgressBar(AbstractControl)

Initializes a new instance of the StdProgressBar class.

Fields

AnimatedChunkSizeProportion

Represents the proportion of the animated chunk size as a floating-point value.

DefaultAnimationTimerInterval

Specifies the default interval, in milliseconds, used for animation timer updates.

DefaultAnimationValueIncrementFactor

Specifies the default increment factor applied to animation values, determining the rate at which animated properties change.

DefaultBottomBorderVisible

Gets or sets whether bottom border is visible by default.

DefaultControlMinimumSize

Represents the default minimum size for a control.

DefaultHasBorder

Gets or sets whether control has border by default.

DefaultLeftBorderVisible

Gets or sets whether left border is visible by default.

DefaultRightBorderVisible

Gets or sets whether right border is visible by default.

DefaultScaleSize

Represents the default size of the left/top and right/bottom indicators.

DefaultTickStyle

Represents the default tick style for a progress bar control.

DefaultTopBorderVisible

Gets or sets whether top border is visible by default.

DefaultUseControlColors

Gets or sets a value indicating whether the progress bar control uses the ControlBackColor and ControlForeColor. Default is true.

Properties

AnimationTimerInterval

Gets or sets the interval, in milliseconds, for the animation timer. When IsIndeterminate is set to true, the progress bar uses a timer to update the animation of the indeterminate state. When this value is null (by default), the timer uses the DefaultAnimationTimerInterval. Setting this property allows you to customize the frequency of animation updates, which can affect the smoothness and performance of the indeterminate animation.

AnimationValueIncrementFactor

Gets or sets the increment factor applied to animation values, which determines the rate of change during animations.

AutoSize

Gets or sets a value indicating whether the slider control automatically sizes itself. If slider is horizontal and is set to auto-size, it will adjust its height automatically. If slider is vertical and is set to auto-size, it will adjust its width automatically. Default is true.

BorderColor

Gets or sets the border color for the GenericBorder control.

ControlKind

Returns control identifier.

DefaultSecondarySpacerColor

Gets default secondary spacer color of the control.

DefaultSpacerColor

Gets default spacer color of the control.

EffectiveAnimationTimerInterval

Gets the effective interval, in milliseconds, used for the animation timer. This value is determined by the specified animation timer interval or defaults to the standard interval if not set.

EffectiveAnimationValueIncrementFactor

Gets the effective increment factor used for animation values, determined by either a user-specified value or a default value if none is set.

HasBorder

Gets or sets a value indicating whether the control has a border.

HorizontalAlignment

Gets or sets the horizontal alignment applied to this control when it is positioned within a parent control.

IsFirstTickVisible

Gets or sets whether the first tick mark is visible on the slider scale.

IsHorizontal

Gets or sets a value indicating whether the slider is horizontal.

IsIndeterminate

Gets or sets a value indicating whether the progress bar operates in an indeterminate state.

IsLastTickVisible

Gets or sets whether the last tick mark is visible on the slider scale.

IsVertical

Gets or sets a value indicating whether the slider is vertical.

LeftTopScale

Gets the left/top scale control of the slider.

MaxLeftTopSpacerSize

Gets the maximum possible size of the left/top spacer control.

Maximum

Gets or sets the upper limit of the range this control is working with.

MinPadding

Gets minimal padding value.

Minimum

Gets or sets the lower limit of the range this control is working with.

Orientation

Gets or sets a value indicating the horizontal or vertical orientation of the slider.

Padding

Gets or sets the padding inside a control.

RightBottomScale

Gets the right/bottom scale control of the slider.

SecondarySpacerColor

Gets or sets the color of the secondary spacer element. If not specified, default secondary spacer color is used, which is defined by the DefaultSecondarySpacerColor property.

SpacerColor

Gets or sets the color of the top or left spacer element of the slider control. If not specified, default spacer color is used, which is defined by the DefaultSpacerColor property.

SuggestedSize

Gets or sets the suggested size of the control.

TickFrequency

Gets or sets a value that specifies the delta between ticks drawn on the control.

TickStyle

Gets or sets a value indicating how to display the tick marks on the slider.

Timer

Gets the timer used for the animation.

Value

Gets or sets a numeric value that represents the current position of the thumb on the slider.

ValueDisplay

Gets or sets the display control for the slider value.

ValueFormat

Gets or sets the format string used to display the value of the slider.

VerticalAlignment

Gets or sets the vertical alignment applied to this control when it is positioned within a parent control.

Methods

ClearTicks()

Clears the ticks.

CoerceMaximum(int)

Coerces minimal value to have the valid range.

CoerceValue(int)

Coerces value the have the valid range.

CreateScale(bool)

Creates an scale control for the slider.

DefaultPaint(PaintEventArgs)

Default painting method of the GenericControl and its descendants.

DisposeManaged()

Override to dispose managed resources. Here we dispose all used object references.

GetAnimatedChunkSize(float, float)

Gets or sets the animated chunk size. It is used when IsIndeterminate is set to true and represents the size of animated part of progress bar in indeterminate mode. The actual size of animated part will be determined by this property and the current orientation.

GetAnimatedChunks(RectD)

Calculates and returns an array of three rectangles representing the animated chunks of the progress bar.

GetAnimationValueIncrement()

Calculates the increment value used for animating progress changes based on the current range between the minimum and maximum values.

GetDefaultHasBorder()

Gets default value for HasBorder.

GetPreferredSize(PreferredSizeContext)

Retrieves the size of a rectangular area into which a control can be fitted, in device-independent units.

OnHandleCreated(EventArgs)

Called when the control's handle is created.

OnMaximumChanged(EventArgs)

Called when the maximum of the Maximum property changes.

OnMinimumChanged(EventArgs)

Called when the minimum of the Minimum property changes.

OnSizeChanged(EventArgs)

Called when the SizeChanged event.

OnTimerTick(object?, EventArgs)

Invoked when the timer interval elapses to allow implementation of animated value changes.

OnValueChanged(EventArgs)

Called when the value of the Value property changes.

RaiseMaximumChanged(EventArgs)

Raises the MaximumChanged event and calls OnMaximumChanged(EventArgs).

RaiseMinimumChanged(EventArgs)

Raises the MinimumChanged event and calls OnMinimumChanged(EventArgs).

RaiseValueChanged()

Raises the ValueChanged event and calls OnValueChanged(EventArgs).

ScaleValueToPosition(int)

Scales a numeric value to a position on the slider.

UpdateScaleVisibility()

Updates the visibility of the indicators based on the current state of the TickStyle property.

UpdateValueDisplay()

Updates the display of the current value in the ValueDisplay control.

Events

FormatValueForDisplay

Occurs when the Value property is formatted for display before it is assigned to display control specified in the ValueDisplay property.

MaximumChanged

Occurs when the value of the Maximum property changes.

MinimumChanged

Occurs when the value of the Minimum property changes.

OrientationChanged

Occurs when the value of the Orientation property changes.

TickFrequencyChanged

Occurs when the value of the TickFrequency property changes.

TickStyleChanged

Occurs when the value of the TickStyle property changes.

ValueChanged

Occurs when the Value property of a slider changes, either by movement of the scroll box or by manipulation in code.