private void SyncState()
        {
            var item      = AssociatedObject.SelectedItem as ListBoxItem;
            var pageToken = NavigateTo.GetPageToken(item);
            var param     = NavigateTo.GetParameters(item);

            if (param is ParameterBase)
            {
                param = ((ParameterBase)param).ToJson();
            }
            if (!string.IsNullOrWhiteSpace(pageToken))
            {
                RootFrame?.Navigate(GetPageType(pageToken), param);
            }

            if (ParentSplitView != null)
            {
                ParentSplitView.IsPaneOpen = false;
            }
        }
        private void OnSelectionChanged(object sender, SelectionChangedEventArgs args)
        {
            var pivot = sender as Pivot;

            if (_oldSelectedIndex == pivot?.SelectedIndex)
            {
                return;
            }
            _oldSelectedIndex = AssociatedObject.SelectedIndex;

            var item      = pivot?.SelectedItem as PivotItem;
            var pageToken = NavigateTo.GetPageToken(item);
            var param     = NavigateTo.GetParameters(item);

            if (param is ParameterBase)
            {
                param = ((ParameterBase)param).ToJson();
            }
            if (pageToken != null)
            {
                NavigationService?.Navigate(pageToken, param);
            }
        }