I'm trying to navigate to a specific page in a UWP app. I've used Windows Template Studio and created 5 pages as part of a Pivot Control.
I want to navigate to the "Settings" page if it a First Time use of the program. My logic can identify the first time use, but I cannot figure out how to navigate to the correct page.
Here is my PivotPage xaml:
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Pivot x:Uid="PivotPage">
<PivotItem x:Uid="PivotItem_Main">
<Frame>
<views:MainPage/>
</Frame>
</PivotItem>
<PivotItem x:Uid="PivotItem_Patient">
<Frame>
<views:PatientPage/>
</Frame>
</PivotItem>
<PivotItem x:Uid="PivotItem_Templates">
<Frame>
<views:TemplatesPage/>
</Frame>
</PivotItem>
<PivotItem x:Uid="PivotItem_PracticeInfo">
<Frame>
<views:PracticeInfoPage/>
</Frame>
</PivotItem>
<PivotItem x:Uid="PivotItem_Settings">
<Frame>
<views:SettingsPage/>
</Frame>
</PivotItem>
</Pivot>
</Grid>
And in my code behind:
if (isFirstTime)
{
// this.Frame.Navigate(SettingsPage);
NavigationService.Navigate(new Uri("/PivotPage.xaml?item=4", UriKind.RelativeOrAbsolute));
}
The error Im getting is : Argument 1: cannot convert from 'System.Uri' to 'System.Type'