Class GridProgressBarInfo
Provides a StyleInfoSubObjectBase object for progress bar properties in a cell.
Each property in this sub object can be configured individually. Properties that have not been initialized will inherit default values from a base style.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridProgressBarInfo : StyleInfoSubObjectBase, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Constructors
GridProgressBarInfo()
Initializes a new instance for GridProgressBarInfo object.
Declaration
public GridProgressBarInfo()
GridProgressBarInfo(StyleInfoSubObjectIdentity)
Initializes a new instance forGridProgressBarInfo object and associates it with an existing GridStyleInfoSubObjectIdentity.
Declaration
public GridProgressBarInfo(StyleInfoSubObjectIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the indentity for this GridProgressBarInfo. |
GridProgressBarInfo(StyleInfoSubObjectIdentity, GridProgressBarInfoStore)
Initializes a new GridProgressBarInfo object and associates it with an existing GridStyleInfoSubObjectIdentity.
Declaration
public GridProgressBarInfo(StyleInfoSubObjectIdentity identity, GridProgressBarInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the indentity for this GridProgressBarInfo. |
GridProgressBarInfoStore | store | A GridProgressBarInfoStore that holds data for this GridProgressBarInfo. All changes in this style object will saved in the GridProgressBarInfoStore object. |
Properties
BackGradientEndColor
Gets or sets the end color of the background gradient when BackgroundStyle is Gradient or Vertical Gradient.
Declaration
public Color BackGradientEndColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
BackGradientStartColor
Gets or sets the start color of the background gradient when BackgroundStyle is Gradient or Vertical Gradient.
Declaration
public Color BackGradientStartColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
BackgroundFallbackStyle
Gets or sets the style of the background when BackgroundStyle is set to System and the system can not support Themes.
Declaration
public ProgressBarBackgroundStyles BackgroundFallbackStyle { get; set; }
Property Value
Type |
---|
ProgressBarBackgroundStyles |
Remarks
By default its value is None.
Examples
This example shows how to sets the style of the background of ProgressBar.
//sets the style of the background when BackgroundStyle is set to System and the system can not support Themes.
this.gridControl1.TableStyle.ProgressBar.BackgroundFallbackStyle = ProgressBarBackgroundStyles.System;
'sets the style of the background when BackgroundStyle is set to System and the system can not support Themes.
Me.gridControl1.TableStyle.ProgressBar.BackgroundFallbackStyle = ProgressBarBackgroundStyles.System
BackgroundImage
Gets or sets the image to draw on the foreground when ProgressStyle is Image.
Declaration
public Image BackgroundImage { get; set; }
Property Value
Type |
---|
System.Drawing.Image |
BackgroundStyle
Gets or sets the style of the background. It can have the following values: -Image -Gradient -Vertical gradient -Tube -Multiple gradient -System -None
Declaration
public ProgressBarBackgroundStyles BackgroundStyle { get; set; }
Property Value
Type |
---|
ProgressBarBackgroundStyles |
Remarks
By default its value is None.
BackMultipleColors
Gets or sets the colors of the background multiple gradient when BackgroundStyle is Multiple Gradient.
Declaration
public Color[] BackMultipleColors { get; set; }
Property Value
Type |
---|
System.Drawing.Color[] |
Remarks
By default its value is an empty array of colors.
BackSegments
Gets or sets a value indicating whether the background is segmented.
Declaration
public bool BackSegments { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
By default its value is False.
BackTubeEndColor
Gets or sets the end color of the background tube when BackgroundStyle is Tube.
Declaration
public Color BackTubeEndColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
BackTubeStartColor
Gets or sets the start color of the background tube when BackgroundStyle is Tube.
Declaration
public Color BackTubeStartColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Default
Gets a default GridProgressBarInfo to be used with a default style.
Declaration
public static GridProgressBarInfo Default { get; }
Property Value
Type |
---|
GridProgressBarInfo |
Remarks
The Default of the GridStyleInfo class will return the validation info that this method generates through its overridden version of GetDefaultStyle().
Default settings are:
Property | Value |
---|---|
ProgressValue | 50 |
Minimum | 0 |
Maximum | 100 |
Step | 10 |
ForeSegments | True |
StretchMultGrad | True |
MultipleColors | False |
GradientStartColor | Color.Red |
GradientEndColor | Color.Lime |
TubeStartColor | Color.Red |
TubeEndColor | Color.Black |
BackSegments | False |
BackMultipleColors | False |
BackGradientStartColor | Color.LightGray |
BackGradientEndColor | Color.White |
BackTubeStartColor | Color.LightGray |
BackTubeEndColor | Color.White |
StretchImage | True |
BackgroundImage | NULL |
SegmentWidth | 12 |
FontColor | Color.White |
ForeColor | Color.DarkCyan |
TextVisible | True |
TextStyle | ProgressBarTextStyles.Percentage |
TextShadow | True |
ProgressStyle | ProgressBarStyles.Constant |
ProgressFallbackStyle | ProgressBarStyles.Constant |
BackgroundStyle | ProgressBarBackgroundStyles.None |
BackgroundFallbackStyle | ProgressBarBackgroundStyles.None |
FontColor
Gets or sets the color of the font.
Declaration
public Color FontColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
ForeColor
Gets or sets the color used to draw the foreground in segment mode and constant mode.
Declaration
public Color ForeColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
ForegroundImage
Gets or sets the image to draw on the foreground when ProgressStyle is Image.
Declaration
public Image ForegroundImage { get; set; }
Property Value
Type |
---|
System.Drawing.Image |
ForeSegments
Gets or sets a value indicating whether the foreground is segmented.
Declaration
public bool ForeSegments { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
By default its value is True which means that the foreground will be drawn segmented.
GradientEndColor
Gets or sets the end color of the foreground gradient when ForegroundStyle is Gradient.
Declaration
public Color GradientEndColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
GradientStartColor
Gets or sets the start color of the foreground gradient when ForegroundStyle is Gradient.
Declaration
public Color GradientStartColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
HasBackGradientEndColor
Gets a value indicating whether BackGradientEndColor property is initialized.
Declaration
public bool HasBackGradientEndColor { get; }
Property Value
Type |
---|
System.Boolean |
HasBackGradientStartColor
Gets a value indicating whether BackGradientStartColor property is initialized.
Declaration
public bool HasBackGradientStartColor { get; }
Property Value
Type |
---|
System.Boolean |
HasBackgroundFallbackStyle
Gets a value indicating whether BackgroundFallbackStyle property is initialized.
Declaration
public bool HasBackgroundFallbackStyle { get; }
Property Value
Type |
---|
System.Boolean |
HasBackgroundImage
Gets a value indicating whether BackgroundImage property is initialized.
Declaration
public bool HasBackgroundImage { get; }
Property Value
Type |
---|
System.Boolean |
HasBackgroundStyle
Gets a value indicating whether BackgroundStyle property is initialized.
Declaration
public bool HasBackgroundStyle { get; }
Property Value
Type |
---|
System.Boolean |
HasBackMultipleColors
Gets a value indicating whether BackMultipleColors property is initialized.
Declaration
public bool HasBackMultipleColors { get; }
Property Value
Type |
---|
System.Boolean |
HasBackSegments
Gets a value indicating whether BackSegments property is initialized.
Declaration
public bool HasBackSegments { get; }
Property Value
Type |
---|
System.Boolean |
HasBackTubeEndColor
Gets a value indicating whether BackTubeEndColor property is initialized.
Declaration
public bool HasBackTubeEndColor { get; }
Property Value
Type |
---|
System.Boolean |
HasBackTubeStartColor
Gets a value indicating whether BackTubeStartColor property is initialized.
Declaration
public bool HasBackTubeStartColor { get; }
Property Value
Type |
---|
System.Boolean |
HasFontColor
Gets a value indicating whether FontColor property is initialized.
Declaration
public bool HasFontColor { get; }
Property Value
Type |
---|
System.Boolean |
HasForeColor
Gets a value indicating whether ForeColor property is initialized.
Declaration
public bool HasForeColor { get; }
Property Value
Type |
---|
System.Boolean |
HasForegroundImage
Gets a value indicating whether ForegroundImage property is initialized.
Declaration
public bool HasForegroundImage { get; }
Property Value
Type |
---|
System.Boolean |
HasForeSegments
Gets a value indicating whether ForeSegments property is initialized.
Declaration
public bool HasForeSegments { get; }
Property Value
Type |
---|
System.Boolean |
HasGradientEndColor
Gets a value indicating whether GradientEndColor property is initialized.
Declaration
public bool HasGradientEndColor { get; }
Property Value
Type |
---|
System.Boolean |
HasGradientStartColor
Gets a value indicating whether GradientStartColor property is initialized.
Declaration
public bool HasGradientStartColor { get; }
Property Value
Type |
---|
System.Boolean |
HasMaximum
Gets a value indicating whether Maximum property is initialized.
Declaration
public bool HasMaximum { get; }
Property Value
Type |
---|
System.Boolean |
HasMinimum
Gets a value indicating whether Minimum property is initialized.
Declaration
public bool HasMinimum { get; }
Property Value
Type |
---|
System.Boolean |
HasMultipleColors
Gets a value indicating whether MultipleColors property is initialized.
Declaration
public bool HasMultipleColors { get; }
Property Value
Type |
---|
System.Boolean |
HasProgressFallbackStyle
Gets a value indicating whether ProgressFallbackStyle property is initialized.
Declaration
public bool HasProgressFallbackStyle { get; }
Property Value
Type |
---|
System.Boolean |
HasProgressOrientation
Gets a value indicating whether ProgressOrientation property is initialized.
Declaration
public bool HasProgressOrientation { get; }
Property Value
Type |
---|
System.Boolean |
HasProgressStyle
Gets a value indicating whether ProgressStyle property is initialized.
Declaration
public bool HasProgressStyle { get; }
Property Value
Type |
---|
System.Boolean |
HasProgressValue
Gets a value indicating whether ProgressValue property is initialized.
Declaration
public bool HasProgressValue { get; }
Property Value
Type |
---|
System.Boolean |
HasSegmentWidth
Gets a value indicating whether SegmentWidth property is initialized.
Declaration
public bool HasSegmentWidth { get; }
Property Value
Type |
---|
System.Boolean |
HasStep
Gets a value indicating whether Step property is initialized.
Declaration
public bool HasStep { get; }
Property Value
Type |
---|
System.Boolean |
HasStretchImage
Gets a value indicating whether StretchImage property is initialized.
Declaration
public bool HasStretchImage { get; }
Property Value
Type |
---|
System.Boolean |
HasStretchMultGrad
Gets a value indicating whether StretchMultGrad property is initialized.
Declaration
public bool HasStretchMultGrad { get; }
Property Value
Type |
---|
System.Boolean |
HasTextShadow
Gets a value indicating whether TextShadow property is initialized.
Declaration
public bool HasTextShadow { get; }
Property Value
Type |
---|
System.Boolean |
HasTextStyle
Gets a value indicating whether TextStyle property is initialized.
Declaration
public bool HasTextStyle { get; }
Property Value
Type |
---|
System.Boolean |
HasTextVisible
Gets a value indicating whether TextVisible property is initialized.
Declaration
public bool HasTextVisible { get; }
Property Value
Type |
---|
System.Boolean |
HasTubeEndColor
Gets a value indicating whether TubeEndColor property is initialized.
Declaration
public bool HasTubeEndColor { get; }
Property Value
Type |
---|
System.Boolean |
HasTubeStartColor
Gets a value indicating whether TubeStartColor property is initialized.
Declaration
public bool HasTubeStartColor { get; }
Property Value
Type |
---|
System.Boolean |
Maximum
Gets or sets the upper boundary for the value.
Declaration
public int Maximum { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
By default its value is 100 which means that the Value of the ProgressBar can not take values higher than 100.
Minimum
Gets or sets the lower boundary for the value.
Declaration
public int Minimum { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
By default its value is 0 which means that the Value of the ProgressBar can not take values lower than 0.
MultipleColors
Gets or sets the colors of the foreground multiple gradient when ForegroundStyle is Multiple Gradient.
Declaration
public Color[] MultipleColors { get; set; }
Property Value
Type |
---|
System.Drawing.Color[] |
Remarks
By default its value is an empty Color array. You can add Colors to the multiple gradient by modifying this property.
Examples
This example shows how to set the colors of the foreground multiple gradient when ForegroundStyle is Multiple Gradient.
Color c = Color.Red;
Color c1 = Color.Black;
Color[] color = new Color[] { c, c1 };
this.gridControl1.TableStyle.ProgressBar.MultipleColors = color;
Dim c As Color = Color.Red
Dim c1 As Color = Color.Black
Dim color() As Color = { c, c1 }
Me.gridControl1.TableStyle.ProgressBar.MultipleColors = color
ProgressFallbackStyle
Gets or sets the style of the foreground when ProgressStyle is System and the system can not support Themes.
Declaration
public ProgressBarStyles ProgressFallbackStyle { get; set; }
Property Value
Type |
---|
ProgressBarStyles |
Examples
This example shows how to set the style of the foreground of ProgressBarAdv.
//set the progress bar style.
this.gridControl1.TableStyle.ProgressBar.ProgressFallbackStyle = ProgressBarStyles.Metro;
ProgressOrientation
Gets or sets the horizontal or vertical style of the progress bar.
Declaration
public Orientation ProgressOrientation { get; set; }
Property Value
Type |
---|
System.Windows.Forms.Orientation |
Examples
This example shows how to set the ProgressBar orientation.
//Align the progress bar.
this.gridControl1.TableStyle.ProgressBar.ProgressOrientation = Orientation.Horizontal;
ProgressStyle
Gets or sets the style of the foreground: -Constant -Gradient -Multiple gradient -Tube -Image -System
Declaration
public ProgressBarStyles ProgressStyle { get; set; }
Property Value
Type |
---|
ProgressBarStyles |
Remarks
By default its value is Constant.
Examples
This example shows how to set the foreground styles for progress bar.
//Set the foreground styles for progress bar.
this.gridControl1.TableStyle.ProgressBar.ProgressStyle = ProgressBarStyles.Tube;
ProgressValue
Gets or sets the value between Minimum and Maximum.
Declaration
public int ProgressValue { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
This value represents the progress state of the ProgessBar. For default it is set to 50, minimum=0, and maximum=100 ( 50% ).
SegmentWidth
Gets or sets the width of the segments.
Declaration
public int SegmentWidth { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
By default it`s value is 12.
Step
Gets or sets the value to increment when Increment() and Decrement() methods.
Declaration
public int Step { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
By default its value is 10 which means that when Increment() is called the Value of the ProgressBar is incremented by 10.
StretchImage
Gets or sets a value indicating whether the foreground image will be stretched.
Declaration
public bool StretchImage { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
By default its value is True.
StretchMultGrad
Gets or sets a value indicating whether the multiple gradient is compressed if the value is smaller than maximum.
Declaration
public bool StretchMultGrad { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
By default its value is True which means that if the Value is less than maximum, the multiple gradient is compressed.
TextOrientation
Gets or sets the orientation of the progress bar text.
Declaration
public Orientation TextOrientation { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.Orientation | One of the System.Windows.Forms.Orientation enumeration that specifies the position of the progress bar text. The default value is System.Windows.Forms.Orientation.Horizontal. |
Examples
This example shows how to set the orientation of the text.
this.gridControl.TableStyle.ProgressBar.TextOrientation = Orientation.Vertical;
TextShadow
Gets or sets a value indicating whether the text shadow is visible.
Declaration
public bool TextShadow { get; set; }
Property Value
Type |
---|
System.Boolean |
TextStyle
Gets or sets the style of the text: -Percentage -Value (Ex: 70/150 )
Declaration
public ProgressBarTextStyles TextStyle { get; set; }
Property Value
Type |
---|
ProgressBarTextStyles |
TextVisible
Gets or sets a value indicating whether the text is visible.
Declaration
public bool TextVisible { get; set; }
Property Value
Type |
---|
System.Boolean |
TubeEndColor
Gets or sets the end color of the foreground tube when ForegroundStyle is Tube.
Declaration
public Color TubeEndColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
TubeStartColor
Gets or sets the start color of the foreground tube when ForegroundStyle is Tube.
Declaration
public Color TubeStartColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Methods
GetDefaultStyle()
Returns Default.
Declaration
protected override StyleInfoBase GetDefaultStyle()
Returns
Type | Description |
---|---|
StyleInfoBase | A GridProgressBarInfo object with default values. |
Overrides
MakeCopy(StyleInfoBase, StyleInfoProperty)
Creates an exact copy of the current object.
Declaration
public override IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoBase | newOwner | The new owner style object for the copied object. |
StyleInfoProperty | sip | An identifier for this object. |
Returns
Type | Description |
---|---|
IStyleInfoSubObject | Copied object. |
Overrides
ResetBackGradientEndColor()
Resets the BackGradientEndColor property.
Declaration
public void ResetBackGradientEndColor()
ResetBackGradientStartColor()
Resets the BackGradientStartColor property.
Declaration
public void ResetBackGradientStartColor()
ResetBackgroundFallbackStyle()
Resets the BackgroundFallbackStyle property.
Declaration
public void ResetBackgroundFallbackStyle()
ResetBackgroundImage()
Resets the BackgroundImage property.
Declaration
public void ResetBackgroundImage()
ResetBackgroundStyle()
Resets the BackgroundStyle property.
Declaration
public void ResetBackgroundStyle()
ResetBackMultipleColors()
Resets the BackMultipleColors property.
Declaration
public void ResetBackMultipleColors()
ResetBackSegments()
Resets the BackSegments property.
Declaration
public void ResetBackSegments()
ResetBackTubeEndColor()
Resets the BackTubeEndColor property.
Declaration
public void ResetBackTubeEndColor()
ResetBackTubeStartColor()
Resets the BackTubeStartColor property.
Declaration
public void ResetBackTubeStartColor()
ResetFontColor()
Resets the FontColor property.
Declaration
public void ResetFontColor()
ResetForeColor()
Resets the ForeColor property.
Declaration
public void ResetForeColor()
ResetForegroundImage()
Resets the ForegroundImage property.
Declaration
public void ResetForegroundImage()
ResetForeSegments()
Resets the ForeSegments property.
Declaration
public void ResetForeSegments()
ResetGradientEndColor()
Resets the GradientEndColor property.
Declaration
public void ResetGradientEndColor()
ResetGradientStartColor()
Resets the GradientStartColor property.
Declaration
public void ResetGradientStartColor()
ResetMaximum()
Resets the Maximum property.
Declaration
public void ResetMaximum()
ResetMinimum()
Resets the Minimum property.
Declaration
public void ResetMinimum()
ResetMultipleColors()
Resets the MultipleColors property.
Declaration
public void ResetMultipleColors()
ResetProgressFallbackStyle()
Resets the ProgressFallbackStyle property.
Declaration
public void ResetProgressFallbackStyle()
ResetProgressOrientation()
Resets the ProgressOrientation property.
Declaration
public void ResetProgressOrientation()
ResetProgressStyle()
Resets the ProgressStyle property.
Declaration
public void ResetProgressStyle()
ResetProgressValue()
Resets the ProgressValue property.
Declaration
public void ResetProgressValue()
ResetSegmentWidth()
Resets the SegmentWidth property.
Declaration
public void ResetSegmentWidth()
ResetStep()
Resets the Step property.
Declaration
public void ResetStep()
ResetStretchImage()
Resets the StretchImage property.
Declaration
public void ResetStretchImage()
ResetStretchMultGrad()
Resets the StretchMultGrad property.
Declaration
public void ResetStretchMultGrad()
ResetTextShadow()
Resets the TextShadow property.
Declaration
public void ResetTextShadow()
ResetTextStyle()
Resets the TextStyle property.
Declaration
public void ResetTextStyle()
ResetTextVisible()
Resets the TextVisible property.
Declaration
public void ResetTextVisible()
ResetTubeEndColor()
Resets the TubeEndColor property.
Declaration
public void ResetTubeEndColor()
ResetTubeStartColor()
Resets the TubeStartColor property.
Declaration
public void ResetTubeStartColor()