Sunday, October 14, 2012

Switching between different views

Problem: You would like to press a button and have the form go to a different view

1 - Create "View 1" (Default) and "View 2" on the form template

2 - On "View 1"  add a button, set the ID of this button to "ChangeView" and change the label to "Change View".

3 - On the Clicked event handler of the button "ChangeView" add the following code

ViewInfos.SwitchView("View 2")

4 - Preview the form, you will notice that when you click the button "ChangeView" the form will switch view to "View 2".

No comments:

Post a Comment

About Me

My photo
Toronto, Ontario, Canada
MBA, M.Sc. & MCP