private void TagCheckInsListView_ItemClick(object sender, ItemClickEventArgs e)
		{
			var tagCheckIn = (CheckInKnowledgeTag)e.ClickedItem;

			var criteria = new CheckInPageCriteria
			{
				CheckInKnowledgeTag = tagCheckIn,
				SearchTerm = ""
			};

			Frame.Navigate(typeof(CheckIns), criteria);
		}
Пример #2
0
		private void GoToPage(string page, int id = 0)
		{
			NavigationSplitView.IsPaneOpen = false;
			if (CurrentPage != page)
			{
				SearchTerm = "";
				SharedAutoSuggestBox.Text = "";
			}

			CurrentPage = page;

			switch (page)
			{
				case "WorkingOn":
					HomeRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "";
					NavigationFrame.Navigate(typeof(Pages.WorkingOn));

					SetSearchAvailabilityStatus(false);
					break;
				case "Home":
					HomeRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "Recommended for you";
					NavigationFrame.Navigate(typeof(Pages.Home));

					SetSearchAvailabilityStatus(true);
					break;
				case "Locations":
					LocationsRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "Locations";
					NavigationFrame.Navigate(typeof(Pages.Locations), SearchTerm);

					SetSearchAvailabilityStatus(true);
					break;
				case "CheckIns":
					CheckInsRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "CheckIns";

					var checkInPageCriteria = new Pages.CheckInPageCriteria
					{
						CheckInKnowledgeTag = new CheckInKnowledgeTag(),
						SearchTerm = SearchTerm
					};

					NavigationFrame.Navigate(typeof(Pages.CheckIns), checkInPageCriteria);

					SetSearchAvailabilityStatus(true);
					break;
				case "CheckInKnowledge":
					CheckInsRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "CheckIns";

					NavigationFrame.Navigate(typeof(Pages.CheckInKnowledge), SearchTerm);
					break;
				case "Events":
					EventsRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "Events";
					NavigationFrame.Navigate(typeof(Pages.Events), SearchTerm);

					SetSearchAvailabilityStatus(true);
					break;
				case "Archive":
					ArchiveRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "Archive";
					NavigationFrame.Navigate(typeof(Pages.Archive));

					SetSearchAvailabilityStatus(false);
					break;
				case "ChatDetail":
					ArchiveRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "Archive";

					var chatDetailPageCriteria = new Pages.ChatDetailPageCriteria
					{
						Chat = null,
						ChatId = id
					};
					NavigationFrame.Navigate(typeof(Pages.ChatDetail), chatDetailPageCriteria);

					SetSearchAvailabilityStatus(false);
					break;
				case "Settings":
					ArchiveRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "Settings";
					NavigationFrame.Navigate(typeof(Pages.Settings));

					SharedAutoSuggestBox.Visibility = Visibility.Collapsed;
					SearchButton.Visibility = Visibility.Collapsed;

					SetSearchAvailabilityStatus(false);
					break;
				case "Profile":
					ProfileRadioButton.IsChecked = true;
					NavigationHeaderTextBlock.Text = "Profile";
					NavigationFrame.Navigate(typeof(Pages.Profile));

					SetSearchAvailabilityStatus(false);
					break;
				
			}

			//ResetPageHeader();
		}