共用方式為


AnnotationService.DeleteAnnotationsCommand 欄位

定義

表示命令,這個命令會刪除目前選取範圍中所有的筆墨/筆跡便箋、文字便箋和反白顯示附註。

public: static initonly System::Windows::Input::RoutedUICommand ^ DeleteAnnotationsCommand;
public static readonly System.Windows.Input.RoutedUICommand DeleteAnnotationsCommand;
 staticval mutable DeleteAnnotationsCommand : System.Windows.Input.RoutedUICommand
Public Shared ReadOnly DeleteAnnotationsCommand As RoutedUICommand 

欄位值

範例

下列範例示範如何將路由命令指派給 XAML 中的功能表項目。

<DocumentViewer.ContextMenu>
  <ContextMenu>
    <MenuItem Command="ApplicationCommands.Copy" />
    <Separator />
    <!-- Add a Highlight annotation to a user selection. -->
    <MenuItem Command="ann:AnnotationService.CreateHighlightCommand"
              Header="Add Highlight" />
    <!-- Add a Text Note annotation to a user selection. -->
    <MenuItem Command="ann:AnnotationService.CreateTextStickyNoteCommand"
              Header="Add Text Note" />
    <!-- Add an Ink Note annotation to a user selection. -->
    <MenuItem Command="ann:AnnotationService.CreateInkStickyNoteCommand"
              Header="Add Ink Note" />
    <Separator />
    <!-- Remove Highlights from a user selection. -->
    <MenuItem Command="ann:AnnotationService.ClearHighlightsCommand"
              Header="Remove Highlights" />
    <!-- Remove Text Notes and Ink Notes from a user selection. -->
    <MenuItem Command="ann:AnnotationService.DeleteStickyNotesCommand"
              Header="Remove Notes" />
    <!-- Remove Highlights, Text Notes, Ink Notes from a selection. -->
    <MenuItem Command="ann:AnnotationService.DeleteAnnotationsCommand"
              Header="Remove Highlights & Notes" />
  </ContextMenu>
</DocumentViewer.ContextMenu>

適用於

另請參閱