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

.NET, Phone, Technical stuff, Windows Phone
See comments

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)



Previous entry | Next blog entry

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