// Token: 0x060062C5 RID: 25285 RVA: 0x001BB4E0 File Offset: 0x001B96E0
        internal static void OnClearHighlightsCommand(object sender, ExecutedRoutedEventArgs e)
        {
            DependencyObject dependencyObject = sender as DependencyObject;

            if (dependencyObject != null)
            {
                AnnotationHelper.ClearHighlightsForSelection(AnnotationService.GetService(dependencyObject));
            }
        }
        // Token: 0x060062C4 RID: 25284 RVA: 0x001BB4B0 File Offset: 0x001B96B0
        internal static void OnCreateInkStickyNoteCommand(object sender, ExecutedRoutedEventArgs e)
        {
            DependencyObject dependencyObject = sender as DependencyObject;

            if (dependencyObject != null)
            {
                AnnotationHelper.CreateInkStickyNoteForSelection(AnnotationService.GetService(dependencyObject), e.Parameter as string);
            }
        }
        // Token: 0x060062C2 RID: 25282 RVA: 0x001BB444 File Offset: 0x001B9644
        internal static void OnCreateHighlightCommand(object sender, ExecutedRoutedEventArgs e)
        {
            DependencyObject dependencyObject = sender as DependencyObject;

            if (dependencyObject != null)
            {
                AnnotationHelper.CreateHighlightForSelection(AnnotationService.GetService(dependencyObject), null, (e.Parameter != null) ? (e.Parameter as Brush) : null);
            }
        }
        // Token: 0x060062C6 RID: 25286 RVA: 0x001BB504 File Offset: 0x001B9704
        internal static void OnDeleteStickyNotesCommand(object sender, ExecutedRoutedEventArgs e)
        {
            DependencyObject dependencyObject = sender as DependencyObject;

            if (dependencyObject != null)
            {
                AnnotationHelper.DeleteTextStickyNotesForSelection(AnnotationService.GetService(dependencyObject));
                AnnotationHelper.DeleteInkStickyNotesForSelection(AnnotationService.GetService(dependencyObject));
            }
        }
        // Token: 0x060062C7 RID: 25287 RVA: 0x001BB534 File Offset: 0x001B9734
        internal static void OnDeleteAnnotationsCommand(object sender, ExecutedRoutedEventArgs e)
        {
            FrameworkElement frameworkElement = sender as FrameworkElement;

            if (frameworkElement != null)
            {
                ITextSelection textSelection = AnnotationHelper.GetTextSelection(frameworkElement);
                if (textSelection != null)
                {
                    AnnotationService service = AnnotationService.GetService(frameworkElement);
                    AnnotationHelper.DeleteTextStickyNotesForSelection(service);
                    AnnotationHelper.DeleteInkStickyNotesForSelection(service);
                    if (!textSelection.IsEmpty)
                    {
                        AnnotationHelper.ClearHighlightsForSelection(service);
                    }
                }
            }
        }
        // Token: 0x060062E0 RID: 25312 RVA: 0x001BC2C0 File Offset: 0x001BA4C0
        private static bool IsCommandEnabled(object sender, bool checkForEmpty)
        {
            Invariant.Assert(sender != null, "Parameter 'sender' is null.");
            FrameworkElement frameworkElement = sender as FrameworkElement;

            if (frameworkElement != null)
            {
                FrameworkElement  frameworkElement2 = frameworkElement.Parent as FrameworkElement;
                AnnotationService service           = AnnotationService.GetService(frameworkElement);
                if (service != null && service.IsEnabled && (service.Root == frameworkElement || (frameworkElement2 != null && service.Root == frameworkElement2.TemplatedParent)))
                {
                    ITextSelection textSelection = AnnotationHelper.GetTextSelection(frameworkElement);
                    if (textSelection != null)
                    {
                        return(!checkForEmpty || !textSelection.IsEmpty);
                    }
                }
            }
            return(false);
        }