Hi,
I have created control where one of children is a canvas. What i am trying to do is to color the canvas background pixel by pixel, calculating color for each pixel. What is more i would like to dynamically refresh background color.
What will be the best solution to solve my problem? Should I inherits Brush class? If yes, could you provide me some examples or sources of knowledge? Or maybe canvas has method, which can be overridden?
all the best
Jack :)
Sam HobbsPosted Oct 1, 2010, 6:39 PM
I think that what you want to do is to create a bitmap in memory and then copy the bitmap to the background in a bacground paint event. You should update the bitmap in a timer event and then after creating a new background, invalidate the control to let Windows re-paint it. I am not experienced with Windows graphics enough to help much with that, and WPF might have ways to make things easier so I apologize if I am misleading you.
Gomathi PalaniswamyPosted Oct 1, 2010, 6:07 AM
Use thread concept to change the background color simultaneously.