private void ListViewMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (PageContentFrame.Content == null && ListViewMenu.SelectedIndex != 0)
            {
                return;
            }

            if (ListViewMenu.SelectedItem is MenuItemSeparator)
            {
                if (selectedEntry != null)
                {
                    ListViewMenu.SelectedItem = selectedEntry;
                }
            }
            else
            {
                var entry = ListViewMenu.SelectedItem as MenuEntry;
                if (entry != null && entry != selectedEntry)
                {
                    selectedEntry = entry;
                    if (string.IsNullOrEmpty(entry.EventName) == false)
                    {
                        EngagementAgent.Instance.SendEvent(entry.EventName);
                    }

                    if (SplitViewModeStateGroup.CurrentState == NarrowState)
                    {
                        SplitView.IsPaneOpen = false;
                    }
                    PageContentFrame.Navigate(entry.TargetPage, PageContentFrame);
                }
            }
        }
 private void BackRequested(object sender, BackRequestedEventArgs e)
 {
     if (viewModel?.PollVisibility == Visibility.Visible)
     {
         e.Handled      = true;
         viewModel.Poll = null;
     }
     else if (viewModel?.AnnouncementVisibility == Visibility.Visible)
     {
         e.Handled = true;
         viewModel.Announcement = null;
     }
     else if (PageContentFrame != null && PageContentFrame.CanGoBack == true)
     {
         e.Handled = true;
         PageContentFrame.GoBack();
     }
 }
 public void NavigateToCustom(Type type)
 {
     PageContentFrame.Navigate(type);
     selectedEntry = viewModel?.MenuEntries?.Where(e => e is MenuEntry).FirstOrDefault(e => type.Equals(((MenuEntry)e).TargetPage)) as MenuEntry;
 }