views:

86

answers:

1

Hello, I'm currently trying to write an application with a progress indicator in C# using WPF:

http://img839.imageshack.us/my.php?image=20100831180406.png

So far the indicator is finished. However I don't have any possibility to lower the length of the indicator yet. I could redraw the indicator using other coordinates but that would be kind of complicated (think about the rounded parts). Also I can't overlay it with white color as it must be transparent due to a background image. Does anyone have an idea on how to achieve what I want? Or point me to another possible solution?

Best greetings, Jonas

A: 

I dunno if I'm understanding what you want, but this is what I'd try

  1. Split it up into 3 columns, with a path in each column. The 1st column is has the path for the left edge.. the middle column will just have the top/bottom and will stretch, the right column will contain the right curves/etc.
  2. Create a rectangle with a radius the same as your inner corners and put it in the 2nd columns.
  3. visualize progress by updating the width of the rectangle.

This approach would only fill the progress up the "neck" of the bottle-like indicator you made.

mdm20