# pdfviewer-annotation-comments

> PdfViewer with annotation tools, comment filters, and toolbar for markup-based PDF review workflows.

**Framework:** wpf  **Component:** PdfViewer  **Variant:** annotation-comments

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/wpf/pdfviewer-annotation-comments.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.PdfViewer.WPF
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/pdfviewer-annotation-comments/PdfViewer.xaml

```xaml
<UserControl
    x:Class="AnnotationComments.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cc="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"
    xmlns:syncfusion="http://schemas.syncfusion.com/wpf">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!-- Toolbar with the annotation tools and the comment filters -->
        <Border Grid.Row="0"
                Padding="10,6"
                Background="#F3F6FA"
                BorderBrush="#D5DCE4"
                BorderThickness="0,0,0,1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <StackPanel Grid.Column="0" Orientation="Horizontal">
                    <TextBlock Margin="0,0,8,0"
                               VerticalAlignment="Center"
                               FontWeight="SemiBold"
                               Text="Annotation" />
                    <ComboBox x:Name="annotationToolCombo"
                              Width="150"
                              VerticalAlignment="Center"
                              DisplayMemberPath="."
                              SelectionChanged="annotationToolCombo_SelectionChanged" />
                </StackPanel>

                <StackPanel Grid.Column="1"
                            Margin="16,0,0,0"
                            Orientation="Horizontal"
                            VerticalAlignment="Center">
                    <TextBlock Margin="0,0,8,0"
                               VerticalAlignment="Center"
                               Foreground="#4C5A67"
                               Text="Comment author" />
                    <TextBox x:Name="authorTextBox"
                             Width="170"
                             VerticalAlignment="Center"
                             TextChanged="authorTextBox_TextChanged" />
                    <Button x:Name="addCommentButton"
                            Margin="10,0,0,0"
                            Padding="14,4"
                            VerticalAlignment="Center"
                            Click="addCommentButton_Click"
                            Content="Add Comment" />
                </StackPanel>

                <StackPanel Grid.Column="2" Orientation="Horizontal">
                    <TextBlock Margin="0,0,8,0"
                               VerticalAlignment="Center"
                               Foreground="#4C5A67"
                               Text="Page" />
                    <TextBox x:Name="pageTextBox"
                             Width="48"
                             VerticalAlignment="Center"
                             Text="1" />
                    <Button x:Name="goToPageButton"
                            Margin="8,0,0,0"
                            Padding="12,4"
                            VerticalAlignment="Center"
                            Click="goToPageButton_Click"
                            Content="Go" />
                </StackPanel>
            </Grid>
        </Border>

        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="3*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="2*" />
            </Grid.ColumnDefinitions>

            <!-- The document with the annotation toolbar -->
            <cc:PdfViewerControl x:Name="pdfViewer"
                                 Grid.Column="0"
                                 Margin="8"
                                 AllowDrop="True"
                                 BorderBrush="#D5DCE4"
                                 BorderThickness="1"
                                 EnableNotificationBar="True"
                                 ShowToolbar="True"
                                 WarnBeforeClose="False"
                                 ZoomMode="FitWidth"
                                 DocumentLoaded="pdfViewer_DocumentLoaded" />

            <GridSplitter Grid.Column="1"
                          Width="4"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          Background="#E4E9EF" />

            <!-- The comment threads that belong to the document -->
            <Border Grid.Column="2"
                    Margin="0,8,8,8"
                    BorderBrush="#D5DCE4"
                    BorderThickness="1"
                    Background="White">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>

                    <Border Grid.Row="0"
                            Padding="10,8"
                            Background="#F3F6FA"
                            BorderBrush="#D5DCE4"
                            BorderThickness="0,0,0,1">
                        <TextBlock FontWeight="SemiBold" Text="Comments" />
                    </Border>

                    <ListBox x:Name="commentList"
                             Grid.Row="1"
                             BorderThickness="0"
                             ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Border Margin="4" Padding="8">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <TextBlock Grid.Row="0"
                                                   FontWeight="SemiBold"
                                                   Foreground="#1F2933"
                                                   Text="{Binding Id}" />
                                        <TextBlock Grid.Row="1"
                                                   Margin="0,2,0,0"
                                                   TextWrapping="Wrap"
                                                   Foreground="#52606D"
                                                   Text="{Binding Message}" />
                                        <StackPanel Grid.Row="2" Margin="0,4,0,0" Orientation="Horizontal">
                                            <TextBlock Foreground="#7B8794" Text="{Binding Author}" />
                                            <TextBlock Margin="8,0,0,0" Foreground="#7B8794" Text="{Binding Location}" />
                                            <TextBlock Margin="8,0,0,0" FontWeight="SemiBold" Text="{Binding Status}" />
                                        </StackPanel>
                                    </Grid>
                                </Border>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </Border>
        </Grid>
    </Grid>
</UserControl>

```
