The Silverlight Unit Testing Framework for Windows Phone 7 is an integral part of my workflow. One thing that has bugged me every time I use it, though, is how I always saw some clipped-off graphics on the bottom of the test harness screen. It looked like some useful information–what was it?
Turns out there is a simple fix. Although it isn’t noticeable, the WP7 system tray (where the clock and signal icons go) is enabled. The tray pushes the rest of the page elements down.
To disable it, open the MainPage.xaml file in your test project and set the
shell:SystemTray.IsVisible="True" flag to
x:Class="MyApp.Tests.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768" SupportedOrientations="Portrait" Orientation="Portrait" shell:SystemTray.IsVisible="False">
Now when you run the tests, you’ll see a bar across the bottom of the screen that summarizes the results of your test run.