private void CairoDesktopWindow_MouseRightButtonUp(object sender, MouseButtonEventArgs e) { // handle desktop context menu // we check source here so that we don't override the rename textbox context menu if (_desktopManager.DesktopLocation != null && (e.OriginalSource.GetType() == typeof(ScrollViewer) || e.Source.GetType() == typeof(Desktop) || e.Source.GetType() == typeof(Grid))) { ShellFolderContextMenu cm = new ShellFolderContextMenu(_desktopManager.DesktopLocation, HandleFolderAction, GetFolderCommandBuilder()); e.Handled = true; } }
private void Window1_OnMouseRightButtonUp(object sender, MouseButtonEventArgs e) { if (folder == null) { return; } ShellFolderContextMenu menu = new ShellFolderContextMenu(folder, folderAction, GetFolderCommandBuilder()); e.Handled = true; }