Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a Circular Style ProgressBar

I need help on implementing a circular progress bar like this:

CircularProgressbar

How should I implement the Circle to fill by increasing Value property?

like image 257
Jalal Avatar asked Feb 02 '11 06:02

Jalal


People also ask

How do you make a circular progress bar?

Step 1: First, we will design a basic progress bar structure using HTML. First, we will create a container div that holds both progress bars. After that, we will create another div inside the container div that creates the circular div element.

How do I add a circular progress bar in Visual Studio?

In order to download NuGet Packages, right-click the project file, and choose "Manage NuGet Packages". Now, browse Circular Progress bar from the NuGet Packages. Download and install CircularProgressBar. In toolbox, under the general field, the installed Circular Progress bar is available.


1 Answers

You have a couple of options - the first is to template the ProgressBar control. This turns out to be a little tricky. I wrote a blog post which describes how to use an attached ViewModel to achieve the required effect.

The other alternative is to create your own control from scratch. You could do the following:

  1. Create a new user control
  2. Add new Value, Maximum and Minimum dependency properties to it.
  3. Handle the Value, Maximum and Minimum property change events in your user control to compute an Angle property.
  4. Construct two 'pie pieces' in code behind (see this post) and add them to the UI.
like image 156
ColinE Avatar answered Sep 18 '22 20:09

ColinE