Skip to content

Commit 2b8b1a1

Browse files
updated annotations comments
1 parent 3c4c778 commit 2b8b1a1

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

Document-Processing/PDF/PDF-Viewer/maui/Annotations-Comment.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,23 @@ The PDF Viewer control provides options to add, edit, and delete comments for th
2020

2121
## Showing/Hiding the Comment panel
2222
The built-in Comment Panel in the PDF Viewer displays annotation comments. You can show or hide this panel using the IsCommentsPanelVisible property. The default value of this property is false.
23+
{% tabs %}
24+
{% highlight c# %}
2325

26+
// Enable the comment panel in the PDF Viewer
27+
PdfViewer.IsCommentsPanelVisible = true;
28+
29+
{% endhighlight %}
30+
{% endtabs %}
31+
32+
{% tabs %}
33+
{% highlight XAML %}
34+
35+
<syncfusion:SfPdfViewer x:Name="PdfViewer" IsCommentsPanelVisible = "True" >
36+
</syncfusion:SfPdfViewer>
37+
38+
{% endhighlight %}
39+
{% endtabs %}
2440

2541

2642
## Comment panel
@@ -29,13 +45,33 @@ The following image represents how to add the comments using the toolbar on the
2945

3046
The following image represents how to add comments using the toolbar on mobile.
3147

48+
{% tabs %}
49+
{% highlight c# %}
50+
51+
ReadOnlyObservableCollection<Annotation> annotations = pdfViewer.Annotations;
52+
Annotation annotation = annotations[0];
53+
Comment comment = new Comment()
54+
{
55+
Text = "First Annotations",
56+
Author="User Name",
57+
ModifiedDate= DateTime.Now,
58+
};
59+
annotation.Comments.Add(comment);
60+
61+
{% endhighlight %}
62+
{% endtabs %}
63+
3264
## Adding comments or replies
33-
You can add the comments or replies using below steps:
65+
Follow these steps to add comments or replies :
3466
1. Select the annotation in the PDF document and open the comment panel.
3567
2. The corresponding comment thread is highlighted in the comment panel.
3668
3. Add comments and replies using the comment panel.
3769
4. Multiple replies can be added to a comment.
3870

71+
## Add comments or replies programmatically
72+
you can add comments or replies to existing annotations programmatically by accessing the specific annotation from the Annotations collection. This allows you to enhance collaboration and provide feedback directly within the PDF.
73+
The following example explains how to add comments or replies to specific annotations in the PDF document.
74+
3975
## Editing the comments and comments replies of the annotations
4076
Comments and replies can be edited through the context menu available under the More Options in the Comment Panel. Follow the steps below:
4177
Select the annotation comment in the comment panel.

0 commit comments

Comments
 (0)