Private Sub Page1_KeyboardStateChanged (Height As Float)
Dim TableViewMaxHeight As Int = TableView1.BaseView.CalcRelativeKeyboardHeight(Height)
Dim TableViewMaxHeightWithNoKeyboard As Int = Page1.RootPanel.Height - 10dip - TableView1.BaseView.Top
'If the keyboard is visible then the TableView ends at the keyboard's top line.
'Otherwise the TableView will end a few pixels from the full page size.
TableView1.BaseView.Height = Min(TableViewMaxHeight, TableViewMaxHeightWithNoKeyboard)
'We are doing the same thing for the CLV.
CustomListView1.GetBase.Height = Min(CustomListView1.GetBase.CalcRelativeKeyboardHeight(Height), _
Page1.RootPanel.Height - 10dip - CustomListView1.GetBase.Top)
End Sub