private async void MusicListControl_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (MusicListControl.SelectedItems.Count == 0) { return; } if (MediaPlayList.FavouriteSongList.Items.Count == 0) { ContentDialog dialog = new ContentDialog { Title = "抱歉", Content = "请等待歌曲加载完成", CloseButtonText = "确定", Background = Application.Current.Resources["DialogAcrylicBrush"] as Brush }; await dialog.ShowAsync(); return; } if (MusicPage.ThisPage.MediaControl.MediaPlayer.Source == MediaPlayList.FavouriteSongList) { MusicPage.ThisPage.MediaControl.AutoPlay = true; MediaPlayList.FavouriteSongList.MoveTo((uint)MusicListControl.SelectedIndex); } else { MusicPage.ThisPage.MediaControl.AutoPlay = false; MusicPage.ThisPage.MediaControl.MediaPlayer.Source = MediaPlayList.FavouriteSongList; MediaPlayList.FavouriteSongList.MoveTo((uint)MusicListControl.SelectedIndex); MusicPage.ThisPage.MediaControl.AutoPlay = true; } }
private void OnDoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (!IsMultipleSelection) { ItemSecondaryActionInvokedCommand?.TryExecute(gridview.SelectedItem); } }
private async void SearchResultList_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if ((e.OriginalSource as FrameworkElement).DataContext is FileSystemStorageItemBase Item) { await LaunchSelectedItem(Item); } }
private async void InkCanvas_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var inchToMillimeterFactor = 25.4f; List <Point> points = new List <Point>(); var scalingX = DpiX / inchToMillimeterFactor; var scalingY = DpiY / inchToMillimeterFactor; var xCord = e.GetPosition(inkCanvas).X / scalingX; var yCord = e.GetPosition(inkCanvas).Y / scalingY; var step = GetRelatedStep((float)xCord, (float)yCord); if (step != null) { curEditingStep = step; var fly = this.myFlyout; SetForm(); this.Type.SelectedIndex = TypeToIndex[curEditingStep.Type]; var options = new Windows.UI.Xaml.Controls.Primitives.FlyoutShowOptions() { Position = e.GetPosition(sender as UIElement) }; fly.ShowAt(sender as FrameworkElement, options); } else { // should say something? } }
private void Lvit_tapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { StackPanel sp = sender as StackPanel; TextBlock tb = sp.FindName("ChatLine") as TextBlock; ReadText(tb.Text); }
private void TextBlockRequirementTitle_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { ((Frame)Parent).Navigate( typeof(Requirements.RequirementEdit), task.requirement, new Windows.UI.Xaml.Media.Animation.DrillInNavigationTransitionInfo()); }
private void ListView_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (semestreSelect.NavigationDestination != null) { Navigate(semestreSelect.NavigationDestination, semestreSelect); } }
//Double tapped ID to var, checks if the item is a sensortag. private void lbxBLEDevices_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { try { var Device = (lbxBLEDevices.SelectedItem.ToString()); var result = String.Join(" ", Device.Split(' ').Skip(2)); // sensortagId = Convert.ToUInt64(result); bool isLong = ulong.TryParse(result.ToString(), out sensortagId); if (isLong) { btnPair.IsEnabled = true; txtblxStatus.Text = "OK"; } else { throw new WrongBLEDeviceException("Unable to connect: device is not a sensortag."); } } catch (WrongBLEDeviceException ex) { txtblxStatus.Text = ex.Message.ToString(); } }
private void ViewDetails_Click(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (ViewModel.SelectedEmployee == null) { return; } GoToDetailsPage(ViewModel.SelectedEmployee); }
private void NameTextBlock_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { NameTextBox.Text = NameTextBlock.Text; NameTextBox.SelectAll(); NameTextBlock.Visibility = Visibility.Collapsed; NameTextBox.Visibility = Visibility.Visible; NameTextBox.Focus(FocusState.Programmatic); }
/// <summary> /// Overrides the doubleTap on bing maps /// </summary> private void Map_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var position = e.GetPosition(Map); Location loc; Map.TryPixelToLocation(position, out loc); SatanController.DirectionLocation = loc; }
private async void DeviceGrid_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { LibraryGrid.SelectedIndex = -1; if ((e.OriginalSource as FrameworkElement)?.DataContext is DriveDataBase Drive) { await OpenTargetDriveAsync(Drive); } }
private async void DataGrid_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var o = DataGrid.SelectedItem; if (o is OrderHeader) { await ShowOrder((o as OrderHeader).OrderID); } }
private async void LibraryGrid_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { DeviceGrid.SelectedIndex = -1; if ((e.OriginalSource as FrameworkElement)?.DataContext is LibraryFolder Library) { await OpenTargetFolder(Library.Folder).ConfigureAwait(false); } }
private void mapItemButton_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var buttonSender = sender as Button; Waypoint wp = buttonSender.DataContext as Waypoint; this.waypointManager.RemoveWayPoint(wp.Location); this.myMap.UpdateLayout(); this.UpdateMapPolyLine(); this.rootPage.NotifyUser($"Removed waypoint", NotifyType.StatusMessage); }
private void ImagesGridView_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (ClickedItemItem != null) { ImageNavigationHelper.ContainingDataSource = imagesGridView.ItemsSource as ImageDataSource; ImageNavigationHelper.ContainingFolder = SelectedContentFolder; ImageNavigationHelper.SelectedImage = ClickedItemItem; ImageClicked?.Invoke(this, new EventArgs()); } }
private void TreeViewItem_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var data = (sender as WinUI.TreeViewItem).DataContext; if (typeof(FolderItem).IsAssignableFrom(data.GetType())) { ItemInvokedWithThisClick = true; ItemSelected?.Invoke(this, new TreeViewItemSelectedEventArgs(SelectedItem)); } }
private async void DeviceGrid_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { LibraryGrid.SelectedIndex = -1; if ((e.OriginalSource as FrameworkElement)?.DataContext is HardDeviceInfo Device) { if (Device.IsLockedByBitlocker) { Retry: BitlockerPasswordDialog Dialog = new BitlockerPasswordDialog(); if (await Dialog.ShowAsync().ConfigureAwait(true) == ContentDialogResult.Primary) { using (FullTrustProcessController.ExclusiveUsage Exclusive = await FullTrustProcessController.GetAvailableController()) { await Exclusive.Controller.RunAsync("powershell.exe", true, true, true, "-Command", $"$BitlockerSecureString = ConvertTo-SecureString '{Dialog.Password}' -AsPlainText -Force;", $"Unlock-BitLocker -MountPoint '{Device.Folder.Path}' -Password $BitlockerSecureString").ConfigureAwait(true); StorageFolder DeviceFolder = await StorageFolder.GetFolderFromPathAsync(Device.Folder.Path); BasicProperties Properties = await DeviceFolder.GetBasicPropertiesAsync(); IDictionary <string, object> PropertiesRetrieve = await Properties.RetrievePropertiesAsync(new string[] { "System.Capacity", "System.FreeSpace", "System.Volume.FileSystem", "System.Volume.BitLockerProtection" }); HardDeviceInfo NewDevice = new HardDeviceInfo(DeviceFolder, await DeviceFolder.GetThumbnailBitmapAsync().ConfigureAwait(true), PropertiesRetrieve, Device.DriveType); if (!NewDevice.IsLockedByBitlocker) { int Index = CommonAccessCollection.HardDeviceList.IndexOf(Device); CommonAccessCollection.HardDeviceList.Remove(Device); CommonAccessCollection.HardDeviceList.Insert(Index, NewDevice); } else { QueueContentDialog UnlockFailedDialog = new QueueContentDialog { Title = Globalization.GetString("Common_Dialog_ErrorTitle"), Content = Globalization.GetString("QueueDialog_UnlockBitlockerFailed_Content"), PrimaryButtonText = Globalization.GetString("Common_Dialog_RetryButton"), CloseButtonText = Globalization.GetString("Common_Dialog_CancelButton") }; if (await UnlockFailedDialog.ShowAsync().ConfigureAwait(true) == ContentDialogResult.Primary) { goto Retry; } } } } } else { await OpenTargetFolder(Device.Folder).ConfigureAwait(false); } } }
private void MainCanvas_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { // Pass event on to the scenario that's in view foreach (Scenario scenario in _scenarios) { if (_scenarioContainersMapping[scenario].Offset.X == _tracker.Position.X) { scenario.CanvasDoubleTapped(sender, e, MainCanvas); } } }
private async void ListView_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var activeAccount = (IAccount)(((ListView)sender).SelectedValue); var editAccount = new EditAccount(activeAccount); var result = await editAccount.ShowAsync(); if (result == ContentDialogResult.Primary) { ViewModel.Refresh(); } }
private static void DataGridDoubleTappedCommand_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var grid = sender as SfDataGrid; ICommand command = GetCommand(grid); if (grid.SelectedItem != null) { command.Execute(grid.SelectedItem); } }
private void baseInkCanvas_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (e == null || _tileCanvas == null) { return; } // centre and zoom var pos = e.GetPosition(baseInkCanvas); _tileCanvas.CentreAndZoom(pos.X, pos.Y); }
void scrollviewer_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var img = VisualTreeUtils.FindFirstElementInVisualTree <Image>(sender as DependencyObject); if (img == null) { return; } var point = e.GetPosition(img); ImageZoom(point, (ScrollViewer)sender, img); }
private void ExistingPinList_DoubleTapped(object sender, [NotNull] Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { CentreOnPin(existingPinList?.SelectedItem); deselect = (e.PointerDeviceType == PointerDeviceType.Touch) ? 1 : 2; if (existingPinList != null) { existingPinList.SelectedIndex = -1; } HidePinsOverlay(); }
private void CamerasList_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { var selectedCamera = CamerasList.SelectedItem as CameraInformation; if (selectedCamera == null) { Status.Text = "No camera selected/found"; return; } Camera.settings.VideoDeviceId = selectedCamera.deviceInformation.Id; Camera.StartPreview(); }
private void border_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (media.CurrentState == MediaElementState.Playing) { media.Pause(); icon.Symbol = Symbol.Play; } else if (media.CurrentState == MediaElementState.Paused) { media.Play(); icon.Symbol = Symbol.Pause; } }
private async void DeviceGrid_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { LibraryGrid.SelectedIndex = -1; if ((e.OriginalSource as FrameworkElement)?.DataContext is DriveRelatedData Device) { if (Device.IsLockedByBitlocker) { Retry: BitlockerPasswordDialog Dialog = new BitlockerPasswordDialog(); if (await Dialog.ShowAsync() == ContentDialogResult.Primary) { using (FullTrustProcessController.ExclusiveUsage Exclusive = await FullTrustProcessController.GetAvailableController()) { await Exclusive.Controller.RunAsync("powershell.exe", string.Empty, WindowState.Normal, true, true, true, "-Command", $"$BitlockerSecureString = ConvertTo-SecureString '{Dialog.Password}' -AsPlainText -Force;", $"Unlock-BitLocker -MountPoint '{Device.Folder.Path}' -Password $BitlockerSecureString"); StorageFolder DriveFolder = await StorageFolder.GetFolderFromPathAsync(Device.Folder.Path); DriveRelatedData NewDevice = await DriveRelatedData.CreateAsync(DriveFolder, Device.DriveType); if (!NewDevice.IsLockedByBitlocker) { int Index = CommonAccessCollection.DriveList.IndexOf(Device); CommonAccessCollection.DriveList.Remove(Device); CommonAccessCollection.DriveList.Insert(Index, NewDevice); } else { QueueContentDialog UnlockFailedDialog = new QueueContentDialog { Title = Globalization.GetString("Common_Dialog_ErrorTitle"), Content = Globalization.GetString("QueueDialog_UnlockBitlockerFailed_Content"), PrimaryButtonText = Globalization.GetString("Common_Dialog_RetryButton"), CloseButtonText = Globalization.GetString("Common_Dialog_CancelButton") }; if (await UnlockFailedDialog.ShowAsync() == ContentDialogResult.Primary) { goto Retry; } } } } } else { await OpenTargetFolder(Device.Folder).ConfigureAwait(false); } } }
private void SampleTreeView_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (e.OriginalSource is ListViewItemPresenter) { ListViewItemPresenter lvip = (ListViewItemPresenter)e.OriginalSource; lastTreeNode = (TreeNode)lvip.Content; EsSystemData data = lastTreeNode.Data as EsSystemData; if (data != null && data.ItemType == EsTreeItemType.esConnection) { lastTreeNode.IsExpanded = !lastTreeNode.IsExpanded; Menu_Open_Click(sender, e); } } }
}// End Edit_Click private void DisplayPictures_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { // Adapted from http://stackoverflow.com/questions/13696210/how-to-get-tapped-item-in-gridview // Get the details of the selected Card var card = (Picture)(sender as GridView).SelectedItem; // If edit mode is enabled navigate to the edit page // Pass over the card with the details if (editEnabled == true) { this.Frame.Navigate(typeof(EditCardPage), card); } }// DisplayPictures_DoubleTapped
private async void FeedbackListView_DoubleTapped(object sender, Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs e) { if (FeedbackListView.SelectedIndex == 0) { await Launcher.LaunchUriAsync(new Uri(@"https://github.com/files-community/files-uwp/issues/new/choose")); } else if (FeedbackListView.SelectedIndex == 1) { await Launcher.LaunchUriAsync(new Uri(@"https://github.com/files-community/files-uwp/releases")); } else if (FeedbackListView.SelectedIndex == 2) { await Launcher.LaunchUriAsync(new Uri(@"https://github.com/files-community/files-uwp/graphs/contributors")); } }