In Silverlight, I want to display progress of, for example, an uploading process as a sequence of incremental color fills on an image.
For example,
this is when progress is 0: 
this is when 30%:
and 100% is a fully colored image: 
How can I control the color fill (I know this will be with the help of a trick, like a final image overlaying the original one or something) to display progress?
My task may be tricky since the image is an OpacityMask for a button in Windows Phone project.
P.S. Just to avoid confusion, as am concerned about the design side of a problem. Logic for hooking up progress with some actions is already in place. I just need to lay out the presentation of a progress.
EDIT
I made an implementation. A more thorough explanation and download of the code can be found on my blog.
C#:
Template: generic.xaml
How to use:
Works like a charm:
Original Answer
You could create a Linear gradient brush like this:
And draw the shape/character/text/whatever using this brush.
To show progress just update the Offsets of the middle two gradientstops. You can bind these to make it easier.
To make a real progress bar: Make a Template for the ProgressBar and (multi)bind the Offsets to the Value, Minimum and Maximum of the Progressbar and calculate the offset by
(Value - Minimum)/(Maximum - Minimum)To use a bitmap (PNG):
Replace the Rect when the progress changes. To cut off the correct amount.
Note that the same image is used for the mask.