Added some code to enhance the performance of the shadow.

I had some problems with the performance of your control. I had no problems while the shadow was disabled. So I looked at the code and added some line to increase the performance. I used some tricks i founded on stackoverflow a few weeks ago.