We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Office Themes for ProgressBarAdv

Is there any way to get an office theme (blue, silver, black) for the ProgressBarAdv?

I'm want to have my progress bars looking something like the top image here:
WPF Progress Bar

I'm assuming that something like this could be done by setting the progress bar to use a foreground image. But that would still require being able to create some images for the various themes, and I'm not too good at photoshop.

It would be nice to have this theming built into the ProgressBarAdv class, similar to how it is done for so many other Syncfusion controls.



3 Replies

ST Saravanan T Syncfusion Team August 25, 2015 06:39 PM UTC

Hi Taylour,

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



TT tttmack August 25, 2015 07:21 PM UTC

Hi Saravanan,

thanks for your reply. The sample you provided had a marquee progress bar (one that keeps going and does not have an associated percent value). Is there a sample you can provide that is a normal progress bar? 

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)? A single color progress bar looks pretty plain, the gradient settings for the ProgressBarAdv don't seem to be able to make anything that looks similar to the sample image either.

Thanks,
Taylour


SK Senthil Kumaran Rajan Syncfusion Team August 26, 2015 10:46 AM UTC

Hi Taylour,

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

Loader.
Up arrow icon