locked
[UWP][HTML] Splitview navigation bar is being covered by Windows phone bar RRS feed

  • Question

  • Hello, I have a small problem with my app. When I run my app on the windows phone emulator, my splitview navigation bar is being covered by the windows phone bar (back, windows button, search) Is there a way to fix that?

    As you can see in the images, everything looks fine until the windows bar is at the same side as the splitview nav bar (I changed the color to red):

    Sunday, October 23, 2016 9:53 AM

Answers

  • Hi,

    You can use  displayInfo.DisplayProperties.onorientationchanged to detect the display orientation change.

    When "displayInfo.DisplayProperties.currentOrientation == displayInfo.DisplayOrientations.landscapeFlipped", change the CSS style of the splitview to adjust the html content to current screen:

    var displayInfo = Windows.Graphics.Display;
    if (displayInfo.DisplayProperties.currentOrientation == displayInfo.DisplayOrientations.landscape)
    {
            //if the initial orientation is landscapeFlipped
            //change the css style to adjust the content
    }
      displayInfo.DisplayProperties.onorientationchanged=function(evt)
    {
       if (displayInfo.DisplayProperties.currentOrientation == displayInfo.DisplayOrientations.landscapeFlipped)
       {
          //change the css style to let the content adjust current screen
       }
       else
       {
         //change the css style back 
       }
    
    }

    Best Regards,

    Elvis Xia

    • Marked as answer by VictorJOD Tuesday, October 25, 2016 5:20 AM
    • Unmarked as answer by VictorJOD Wednesday, November 16, 2016 7:59 PM
    • Marked as answer by VictorJOD Wednesday, November 16, 2016 8:00 PM
    Monday, October 24, 2016 8:59 AM