Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private page2 As Page
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
page2.Initialize("page2")
page2.RootPanel.Color = Colors.Red
Dim b1 As BarButton
b1.InitializeText("abc", "abc")
page2.TopLeftButtons = Array(b1)
End Sub
Sub Page1_Click
NavControl.ShowPage(page2)
End Sub
Sub page2_BarButtonClick (Tag As String)
If Tag = "abc" Then
page2.TopLeftButtons = Array() '<----------------------
End If
End Sub