Book for WinRT > Book for WinRT Task-Based Help > Setting the Current Page |
The C1Book.CurrentPage property gets or sets the value of the C1Book control's current page. By default the C1Book control starts with the first page displayed, but you can customize this by setting the C1Book.CurrentPage property in XAML and in code.
In XAML
For example, to set the C1Book.CurrentPage property to 3, add CurrentPage="3" to the <Extended:C1Book> tag so that it appears similar to the following:
Markup |
Copy Code
|
---|---|
<Extended:C1Book x:Name="c1book1" Height="300" Width="450" CurrentPage="3"> |
In Code
For example, to set the C1Book.CurrentPage property to 3, add the following code to your project:
Visual Basic |
Copy Code
|
---|---|
c1book1.CurrentPage = 3 |
C#
c1book1.CurrentPage = 3;
What You've Accomplished
You've changed the book's initial starting page. If you run the application, the initial page that appears will be page 3.