How can I remove the white borders at the side of the screen on Windows phone?

DanTheNewbieDanTheNewbie GBMember
edited August 2017 in Xamarin.Forms

Hello all. I'm using Xamarin to make a cross platform app. I have a set a background image using the following code:

It work's perfectly on Android devices and emulators, but the Windows phone shows white side borders on the screen. I can't work out how to change this and haven't found a mention of this in the guides. I would really appreciate some advice! (I feel more comfortable working in XAML, so suggestions in that would be great.)
Thanks in advance!

Best Answer


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    Most controls have default values for margin, padding and so on. Those default can differ between OSes in order to achieve the expected look/feel for each OS.

    Try deliberately setting all the options on the grid to zero (0)

  • JohnHardmanJohnHardman GBUniversity mod

    @DanTheNewbie - Out of curiosity, have you checked to see what AspectFit and Fill do on WinPhone?

    Also, what versions of Windows do you need to support? WinPhone 8.0 SL support in Xamarin.Forms is being deprecated, with some reported bugs being closed without fixing.

  • DanTheNewbieDanTheNewbie GBMember

    Thank you everyone for your replies.
    @Sme - that code worked great!
    @JohnHardman - thanks for the heads up on the Windows 8 support. We are developing a fully cross platform app currently, but I will pass that onto the rest of the team so we can then make the client aware.


Sign In or Register to comment.