The BLINK tag is back, and it runs on WP7 now (#wp7dev)

OK this one is really funny… we got hit by it on one of the projects I was working on for Windows Phone 7, and we didn’t quite understand what was happening until my esteemed colleague John Zolezzi dug in and found the bug… So here it is:

In Silverlight for the Windows Phone, you can change the color of the caret (the small vertical blinking bar indicating where text is being entered). However, if you use a brush from the resources as the CaretBrush for a TextBox, using the same brush on a TextBlock anywhere else in the application will cause the text to blink. So the lesson learned here is: Always use dedicated brushes for the carets, and do not use these brushes for anything else in the application.

(download a repro)

Cheers,

Laurent


            
			
Print | posted on Wednesday, October 13, 2010 12:19 PM

Feedback

# re: The BLINK tag is back, and it runs on WP7 now (#wp7dev)

left by Steve at 11/18/2010 10:41 PM Gravatar
Let me guess, something to do with the high order bit.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: