Igor Kulman

How to get rid of the strange line under systray in Windows Phone 8

· Igor Kulman

If you create an Windows Phone 8 app and test it only on WVGA and 720p devices or emulators, you may be surprised how you app looks on a WXGA device (or emulator).

1px bug

I have not been able the reason why this happens but the solution is quite simple. Set your page’s top border to -1.

<Grid x:Name="LayoutRoot" Margin="0 -1 0 0">

Doing this in XAML for every page is not very convenient, a better solution would be to set the negative top margin on the whole application frame

private void InitializePhoneApplication()
    RootFrame.Margin = new Thickness(0, -1, 0, 0);

If you use Caliburn.Micro, you need to override the CreatePhoneApplicationFrame in the Bootstrapper instead

protected override PhoneApplicationFrame CreatePhoneApplicationFrame()
    var frame = new PhoneApplicationFrame { Margin = new Thickness(0, -1, 0, 0) };
    return frame;

See also