Private Sub Application_Start (Nav As NavigationController)
NavControl=Nav
pg.Initialize("pg")
pg.RootPanel.LoadLayout("SafeAreaPanel")
Panel_root.LoadLayout("main")
NavControl.NavigationBarVisible = False
NavControl.ShowPage(pg)
end sub
Private Sub pg_resize(Width As Int, Height As Int)
Dim r As Rect = pg.SafeAreaInsets
If r.Bottom>0 Or r.Left>0 Then
IphoneX=True
Else
IphoneX=False
End If
Panel_root.SetLayoutAnimated(0, 1, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
ScreenX=Width - r.Right - r.Left
ScreenY=Height - r.Bottom - r.Top
End Sub