Skip Navigation LinksHome / Articles / View Article

Silverlight Testing framework bug - FrameworkElements are not visible on the TestSurface

+ Add to SilverlightShow Favorites
0 comments   /   aggregated from Eric Hexter on Apr 20, 2008  /  original article
(0 votes)
Categories: Issues
Technorati Tags: Silverlight,Unit Testing,Test Framework

Working with the Silverlight testing framework the last three weeks has been interesting.  I ran into a crazy intermittent bug which drove me made for about 2 hours.  The usercontrol that I was adding to the TestSurface would be visible about 50% of the time when running my tests. The test would still run and I could hear the audio portion of the videos that were playing as part of an integration test, but the Controls were not visible on the test surface. All I could see was the blank test surface and the testing framework status on the right side of the test runner.

After resorting to reflector on the test framework I found that the TestSurface is a Grid control.  That got me to think that since my controls parent control is also a Grid control that maybe the nested grids are just having some sort of issue.  I ended up solving the problem by Adding my controls to a Canvas control and adding the Canvas instance to the TestSurface.  Code as follows......

Subscribe to this feed: 



This solved my problem... The issue is not with the test framework as much as the silverlight runtime.  It is still beta so what do you expect?

More posts on the test framework, both unit testing and integration testing, to come soon.


Additional Info: 

For more information about the silverlight testing framework see:



Comments RSS RSS
No comments

Add Comment


Please add 8 and 7 and type the answer here:

Help us make SilverlightShow even better. Whether you'd like to suggest a change in the structure, content organization, section layout or any other aspect of SilverlightShow appearance - we'd love to hear from you! Need material (article, tutorial, or other) on a specific topic? Let us know and SilverlightShow content authors will work to have that prepared for you. (hide this)