You can handle the Pivot control LoadingPivotItem . This event PivotItemEventArgs , which includes a property that lets you know which point will be shown. Using this, you can load the appropriate controls and properties. For instance,
private void pivotMain_LoadingPivotItem(object sender, PivotItemEventArgs e) { if (e.Item == pivotItem1) {
In the above example, pivotItem1 and pivotItem2 are the names I gave to each PivotItem so that you can specify any names you want for each PivotItem and see if they will be displayed. If you want to handle the event after loading PivotItem, you can use the Pivot.LoadedPivotItem method.
If you want to know which PivotItem is currently displayed at any time, you can use the Pivot.SelectedIndex method. It is based on zero, so the first PivotItem will have index 0 , the second will have 1 , etc.
source share