Dim nc As NavigationController
nc.Initialize("nc")
NavControl = nc
Page1.Initialize("Page1")
Dim lp As Page
lp.Initialize("lp")
lp.RootPanel.Color = Colors.Red
Dim rp As Page
rp.Initialize("rp")
rp.RootPanel.Color = Colors.Green
smc.Initialize(Null, nc, Null)
Main.app.KeyController = smc
Page1.HideBackButton = True
NavControl.SetNavigationBarVisibleAnimated(False)
Page1.RootPanel.Color = Colors.Blue
Page1.RootPanel.LoadLayout("ScrollViewLayoutOnly") ' only has a ScrollView1
ScrollView1.Panel.LoadLayout("Layout1") ' has my layout with a panel which is 610dip in height
ScrollView1.Left = 0dip
ScrollView1.Width = 100%x
ScrollView1.Height = 100%y - 50dip - 50dip
ScrollView1.Top = 50dip
' I want it 50dip from the top of screen, and 50dip from the bottom of the screen
ScrollView1.Panel.Height = 610dip
ScrollView1.Panel.Width = 100%x
nc.ShowPage(Page1)