Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
pMain.Initialize("pMain")
pMain.RootPanel.LoadLayout("Main")
LoadApplayout 'Here is currently loaded
...
End Sub
Private Sub pMain_Resize(Width As Int, Height As Int)
Dim r As Rect = pMain.SafeAreaInsets
pnlRoot.SetLayoutAnimated(0, 1, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
'LoadApplayout 'Should it be loaded here?
End Sub
Private Sub pnlRoot_Resize(Width As Int, Height As Int)
'LoadApplayout 'Should it be loaded here?
...
End Sub
Sub LoadApplayout
If UserOrientation = Vertikal Then
pnlRoot.LoadLayout("layVertikal")
Else
pnlRoot.LoadLayout("layOrizontal")
End If
End Sub