Office Themes for ProgressBarAdv

Thank you for using Syncfusion products.
We regret to let you know that, at present ProgressBarAdv doesn’t have a direct support to specify the Office Color theme (blue, black and silver). Alternatively, the reported requirement can be achieved by handling its event named “DrawWaitingCustomRender” and enabling the property named “CustomWaitingRender” to custom draw the waiting render in ProgressBarAdv. Please make use of the following code example for your reference.
Code Snippet [C#]:
| //To specify the ProgressBar Stle this.progressBarAdv1.ProgressStyle = Syncfusion.Windows.Forms.Tools.ProgressBarStyles.WaitingGradient; //To customize the Waiting render this.progressBarAdv1.CustomWaitingRender = true; //To enable the waiting gradient this.progressBarAdv1.WaitingGradientEnabled = true; //To customize the appearance of the Waiting render. this.progressBarAdv1.DrawWaitingCustomRender += new Syncfusion.Windows.Forms.Tools.ProgressBarAdvDrawEventHandler(progressBarAdv1_DrawWaitingCustomRender);
//Handle this event to draw a custom waiting render void progressBarAdv1_DrawWaitingCustomRender(object sender, Syncfusion.Windows.Forms.Tools.ProgressBarAdvDrawEventArgs e) { Region region = new System.Drawing.Region(); region.MakeEmpty(); region.Union(e.Rectangle); Brush brush = new SolidBrush(Color.FromArgb(187, 212, 246)); e.Graphics.FillRegion(brush, region); e.Handled = true; } |
Screenshot:
We have also prepared sample for your reference and it can be downloaded from the following location:
Sample Location: https://www.syncfusion.com/downloads/support/forum/120023/ze/ProgressBarAdv_CustomDraw-1892965157
Could you please look into the above sample and let us know whether it helps.
Please let us know if you need any further assistance,
Regards,
Saravanan T
Thank you for your update.
Query 1 : One that keeps going and does not have an associated percent value?
To display percentage Value in ProgressBarAdv, it can be achieved by using the property named TextStyle. Please make use of the below code example,
Code Example[C#]:
| //To display percentage value in ProgressBarAdv this.progressBarAdv1.TextStyle = Syncfusion.Windows.Forms.Tools.ProgressBarTextStyles.Percentage; |
Query 2: Also is it possible to get multiple colors for the progress bar like the sample image (where the top half and bottom half are different colors)?
Yes it is possible to get multiple color for the ProgressBarAdv as shown in the image provided by you using the property named ProgressStyle. Please make use of the below code example,
Code Example[C#]:
| //To set style for ProgressBarAdv this.progressBarAdv1.ProgressStyle = Syncfusion.Windows.Forms.Tools.ProgressBarStyles.Tube;
//To set TubeEnd Color this.progressBarAdv1.TubeEndColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(146)))), ((int)(((byte)(242))))); //To set TubeStart color this.progressBarAdv1.TubeStartColor = System.Drawing.Color.Lime;
|
Query 3 : The sample you provided had a marquee progress bar, Is there a sample you can provide that is a normal progress bar?
We have prepared the sample based on the reported requirement and it can be downloaded from the below location.
Sample Location : https://www.syncfusion.com/downloads/support/forum/120023/ze/ProgressBarAdv1790484380
Please let us know if you need further assistance.
Regards,
Senthil
- 3 Replies
- 3 Participants
-
TT tttmack
- Aug 24, 2015 05:59 PM UTC
- Aug 26, 2015 10:46 AM UTC