I recommend using NavigationView to instead of Pivot, NavigationView automatically adapts to different screen sizes and allows for greater customization. As follows:
You could refer to the following code.
MainPage.xaml:
<NavigationView x:Name="rootNavigationView" PaneDisplayMode="Top"
ItemInvoked="NavView_ItemInvoked">
<NavigationView.MenuItems>
<NavigationViewItem Content="Section 1" x:Name="Section1Content" />
<NavigationViewItem Content="Section 2" x:Name="Section2Content" />
……
<NavigationViewItem Content="Section 8" x:Name="Section8Content" />
<NavigationViewItem Content="Section 9" x:Name="Section9Content" />
<NavigationViewItem Content="Section 10" x:Name="Section10Content" />
</NavigationView.MenuItems>
<Frame x:Name="ContentFrame"/>
</NavigationView>
Code behind:
private void NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
{
var item = args.InvokedItemContainer;
switch (item.Name)
{
case "Section1Content":
ContentFrame.Navigate(typeof(Section1Page));
break;
case "Section2Content":
ContentFrame.Navigate(typeof(Section2Page));
break;
……
}
}
Section1Page.xaml:
<Page
..>
<Grid>
<TextBlock Text="Content of section 1."/>
</Grid>
</Page>