Written: 2008-May-10
Author: Alan Cobb
Description: Problem with TextBlock text wrapping in Silverlight 2 Beta 1.
Environment: SL2B1 on XP with SP2 under both IE7 and FF.

In this case when text in the TextBlock is wrapped all the text will disappear from the TextBlock, depending on the width of the browser window.

Steps to reproduce problem:
To repro the problem with 100% certainty do the following: Click the link below to open the Silverlight demo app window. Silverlight app page demoing problem (click to open separate SL app window)

Size the new browser window horizontally so that the first line (a a a...) just fills the width of the window. That is, if you were to make the browser window 1 pixel narrower one "a" would wrap to the second line. (See 1st screen capture below.) Then press the button that appends " xyz" to the text of the TextBlock. On that first press all the text will disappear from the TextBlock. (See 2nd screen capture below.)

Now size the browser window horizontally narrower and wider. The text in the TextBlock will sometimes wrap correctly and and sometimes disappear completely for different widths of the browser window.

Source code: VS2008 solution for this demo app.

something1 something2