**The page container control is available in versions BETA4 and higher**


Please see the **UgMasterPageDemo** project for the source code created in this chapter. See [Installing examples](🔗) for information on how to download the examples.

# Introduction

The page container control brings usability and code reuse to SCADE. Prior to the page control, the SCADE developer had to repeat certain elements, making page development a little cumbersome. Now, with the new page control, navigation elements such as a toolbar or navigation bar can be reused across pages.

To achieve this, we introduced the page container control (short page control) which allows for the embedding of pages in other pages.

# Minimal Page Container App

The following app demonstrates the loading of pages. By default, we load page1 on startup, and use the toolbar to switch to page2 and page3. The demo app itself is kept very minimalistic

(Script tags will be stripped)

## Steps

  1. Create new app

  2. Add toolbar control and on top of that, insert Page control **pageContainer1**

(Script tags will be stripped)

  1. Uncheck, as always, the vertical Fill Space setting of **toolbar1**

  2. Create 3 new pages page1, page2 and page3 with a simple label

  3. Load the page1 with in the load method of the main page

We use the load method to **load** a page, and we use the **show** method to display the page. Please understand that the show method is on the page itself and requires the pageContainer object as its parameter