|
@@ -83,15 +83,15 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
|
|
|
#region 阅读页 - 右键菜单
|
|
|
|
|
|
- private ContextMenu ViewerContextMenu()
|
|
|
+ private ContextMenu ViewerContextMenu(object sender)
|
|
|
{
|
|
|
ContextMenu contextMenu = App.Current.FindResource("ViewerContextMenu") as ContextMenu;
|
|
|
//contextMenu.Loaded += ContextMenu_Loaded;
|
|
|
- ViewerContextMenu_Loaded(contextMenu, null);
|
|
|
+ ViewerContextMenu_Loaded(contextMenu, sender);
|
|
|
return contextMenu;
|
|
|
}
|
|
|
|
|
|
- private void ViewerContextMenu_Loaded(object sender, RoutedEventArgs e)
|
|
|
+ private void ViewerContextMenu_Loaded(object sender, object e)
|
|
|
{
|
|
|
ContextMenu contextMenu = sender as ContextMenu;
|
|
|
if (contextMenu.Items.Count > 0)
|
|
@@ -121,18 +121,18 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
{
|
|
|
case "Paste":
|
|
|
//粘贴
|
|
|
- if (!ApplicationCommands.Paste.CanExecute(null, (UIElement)sender))
|
|
|
- {
|
|
|
- menuItem1.IsEnabled = false;
|
|
|
- menuItem1.Opacity = 0.5;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- menuItem1.IsEnabled = true;
|
|
|
- menuItem1.Opacity = 1;
|
|
|
- }
|
|
|
- menuItem1.CommandTarget = (UIElement)sender;
|
|
|
- menuItem1.Command = ApplicationCommands.Copy;
|
|
|
+ //if (!ApplicationCommands.Paste.CanExecute(null, (UIElement)sender))
|
|
|
+ //{
|
|
|
+ // menuItem1.IsEnabled = false;
|
|
|
+ // menuItem1.Opacity = 0.5;
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // menuItem1.IsEnabled = true;
|
|
|
+ // menuItem1.Opacity = 1;
|
|
|
+ //}
|
|
|
+ menuItem1.CommandTarget = (UIElement)e;
|
|
|
+ menuItem1.Command = ApplicationCommands.Paste;
|
|
|
break;
|
|
|
|
|
|
case "AddAnnotation":
|