//private void ChapterPreview_Tap(object sender, System.Windows.Input.GestureEventArgs e) //{ // var grid = sender as Grid; // var cpvm = grid.DataContext as ViewModels.ChapterPreviewModel; // var chapterViewUri = new Uri("/ChapterViewPage.xaml?id=" + cpvm.ID, UriKind.Relative); // NavigationService.Navigate(chapterViewUri); //} private void SeriesName_Tap(object sender, System.Windows.Input.GestureEventArgs e) { var elem = sender as FrameworkElement; var spvm = elem.DataContext as ViewModels.SeriesPreviewModel; var uri = new Uri(spvm.NavigateUri, UriKind.Relative); NavigationService.Navigate(uri); }
private void Feedback(object sender, System.Windows.Input.GestureEventArgs gestureEventArgs) { var task = new EmailComposeTask { To = "*****@*****.**", Subject = "Irish Roadwatch Live App Feedback" }; task.Show(); }
private void PassengerDown_Tap(object sender, System.Windows.Input.GestureEventArgs e) { int count = Convert.ToInt32(PassengerCount.Text); if (count != 0) { PassengerCount.Text = count - 1 + ""; } }
private void DeleteSample_OnTap(object sender, System.Windows.Input.GestureEventArgs e) { var contextMenuItem = sender as MenuItem; if (contextMenuItem == null) { return; } this._viewModel.OnDeleteSample = contextMenuItem.DataContext as ToDoSample; ShowDeleteSampleDialog(); }
void image_Tap(object sender, System.Windows.Input.GestureEventArgs e) { try { if (LayoutRoot.Children.Contains(image)) { LayoutRoot.Children.Remove(image); } } catch { } }
/// <summary> /// Handles the map tap event. This event is not routed to the ViewModel because we need to /// directly use the map control's ability to convert a tap-point to an actual GeoCoordinate. /// Once we have the necessary GeoCoordinate data we route it to a RelayCommand in the ViewModel /// to handle all futher process required /// </summary> private void LocationMapOnTap(object sender, System.Windows.Input.GestureEventArgs e) { try { // Will the ViewModel allow us to change the RoundUp point, or does the user want to close // the map controls overlay? if (ViewModel.AllowRoundUpPointLocationChange) { // Get tap point relative to the map control var p = e.GetPosition(LocationMap); // Ask the map to convert this to a GeoCoordinate var roundUpPointGeoCoordinate = LocationMap.ConvertViewportPointToGeoCoordinate(p); // Now ask the ViewModel to handle the details for creating the new RoundUp point. // It will only do this if the user has previously requested setting a new RoundUp point // using the StartSetNewRoundUpPointCommand menu option. This prevents map taps in normal usage // from accidentally setting a new RoundUp point ViewModel.SetNewRoundUpPointCommand.Execute(roundUpPointGeoCoordinate); } else if (ViewModel.ShowMapControlPanel) { ViewModel.ShowMapControlPanelCommand.Execute(null); // Hide the map control panel } else if (ViewModel.ShowShareUI) { ViewModel.ShowSharePanelCommand.Execute(null); // Hide the share panel } else if (ViewModel.ShowAcceptInviteUI) { ViewModel.CancelAcceptInviteCommand.Execute(null); // Hide the share panel } else if (ViewModel.ShowInviteesUI) { ViewModel.ShowInviteesPanelCommand.Execute(null); // Hide the invitees panel } else if (ViewModel.ShowDirectionsUI) { ViewModel.ShowDirectionsPanelCommand.Execute(null); // Hide the directions panel } } catch (Exception ex) { Logger.Log(ex, new StackFrame(0, true)); } }
private void DayControl_Tap(object sender, System.Windows.Input.GestureEventArgs e) { KeyValuePair <DateTime, ContentControl> item = _DayControls.FirstOrDefault(x => x.Value == (ContentControl)sender); if (null != DaySelected) { DaySelected(this, new DateTimeSelectedEventArgs(item.Key)); } DateTime dt = ((sender as ContentControl).DataContext as CalendarMonthViewDayModel).DateTime; if (dt.Year != Date.Year || dt.Month != Date.Month) { Date = new DateTime(dt.Year, dt.Month, 1); } CurrentDay = dt; }
private void ChapterBubble_OnTap(object sender, System.Windows.Input.GestureEventArgs e) { var elem = sender as FrameworkElement; if (elem == null) { Debug.WriteLine("Unpredicted Tap sender : " + sender.ToString()); return; } var cpvm = elem.DataContext as ViewModels.ChapterPreviewModel; if (cpvm == null) { Debug.WriteLine("Unpredicted Tap sender : " + sender.ToString()); return; } var chapterViewUri = new Uri(cpvm.NavigateUri, UriKind.Relative); NavigationService.Navigate(chapterViewUri); }
private void MainItemGrid_OnHighlightingTextBlockTap(object sender, System.Windows.Input.GestureEventArgs args) { MainItem_OnTapCommon <HighlightingTextBlock>(sender, args); }
private void GrdChePanel_OnTap(object sender, System.Windows.Input.GestureEventArgs e) { MenuSetting(); }
private void AttachLocation_OnTap(object sender, System.Windows.Input.GestureEventArgs e) { ViewModel.AttchLocation(ContactLocation.Location); }
private void Next_Tap(object sender, System.Windows.Input.GestureEventArgs e) { NavigationService.Navigate(new Uri("/HistoryPage.xaml", UriKind.Relative)); }
private void HubTile_Tap(object sender, System.Windows.Input.GestureEventArgs e) { HubTile ht = (HubTile)sender; NavigationService.Navigate(new Uri("/AddPage.xaml?category=" + ht.Title, UriKind.Relative)); }
private void ClearFloor_Tap(object sender, System.Windows.Input.GestureEventArgs e) { replayid = 0; floor.Text = "无引用"; listBox.SelectedIndex = -1; }