I’m a bit confused that I can’t seem to access the StructuredNavigation object of the PageControl. Due to this, I can’t use use NavigateTo, and have to resort to Set. (Is PageControl not intended to be used this way?)
Here’s how I do it ATM:
<!-- Main View -->
<DockPanel>
<!-- Navigation Bar -->
<NavigationBar DockPanel.Dock="Top">
<StackPanel Orientation="Horizontal">
<Button Text="Page1">
<Pressing>
<Set Target="_pageControl.Active" Value="_page1" />
</Pressing>
</Button>
<Button Text="Page2">
<Pressing>
<Set Target="_pageControl.Active" Value="_page2" />
</Pressing>
</Button>
<Button Text="Page3">
<Pressing>
<Set Target="_pageControl.Active" Value="_page3" />
</Pressing>
</Button>
</StackPanel>
</NavigationBar>
<!-- Page View -->
<PageControl ux:Name="_pageControl">
<Page ux:Name="_page1">
<Text Content="Page1"/>
</Page>
<Page ux:Name="_page2">
<Text Content="Page2"/>
</Page>
<Page ux:Name="_page3">
<Text Content="Page3"/>
</Page>
</PageControl>
</DockPanel>
Is this how it should be done?