From 042454aa4665d2c958e737307483a2cbe00e4f1f Mon Sep 17 00:00:00 2001 From: pipeline Date: Wed, 16 Dec 2020 20:42:51 -0800 Subject: [PATCH] Latest source merged from Syncfusion --- .../SfPdfViewer/FreeText-Annotation.md | 15 +++++++++++++ .../Working-with-custom-stamp-annotations.md | 22 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/xamarin-android/SfPdfViewer/FreeText-Annotation.md b/xamarin-android/SfPdfViewer/FreeText-Annotation.md index c1d1a87..42e83d5 100644 --- a/xamarin-android/SfPdfViewer/FreeText-Annotation.md +++ b/xamarin-android/SfPdfViewer/FreeText-Annotation.md @@ -149,6 +149,21 @@ pdfViewer.AnnotationSettings.FreeText.TextSize = 4; {% endhighlight %} {% endtabs %} +### Setting the default background-color + +You can set the background color for the free text annotations using the `SfPdfViewer.AnnotationSettings.FreeText.FillColor` property. The default value is set to `Color.Transparent`. + +{% tabs %} +{% highlight c# %} + +//Setting the background color of the free text annotation + +pdfViewerControl.AnnotationSettings.FreeText.FillColor = Color.LightBlue; + +{% endhighlight %} +{% endtabs %} + + ### Changing the properties of a selected free text You can change the properties of the selected annotation by casting the `sender` parameter of the `FreeTextAnnotationSelected` event handler to `FreeTextAnnotation` and modifying its properties. The following code shows how to change the properties. diff --git a/xamarin-android/SfPdfViewer/Working-with-custom-stamp-annotations.md b/xamarin-android/SfPdfViewer/Working-with-custom-stamp-annotations.md index b3f250a..e3651d0 100644 --- a/xamarin-android/SfPdfViewer/Working-with-custom-stamp-annotations.md +++ b/xamarin-android/SfPdfViewer/Working-with-custom-stamp-annotations.md @@ -153,4 +153,24 @@ When you select the custom stamp annotation, delete icon will appear on the bott pdfViewer.StampAnnotationRemoved += PdfViewer_StampAnnotationRemoved; {% endhighlight %} -{% endtabs %} \ No newline at end of file +{% endtabs %} + +## How to retrieve the actual view added as the stamp using the AddStamp method? + +The stamp annotation view can be retrieved when the stamp is added, tapped, selected, deselected, moved, or resized, and removed from the event data parameter of the respective event handler from the [`CustomStampView`](https://help.syncfusion.com/cr/xamarin-android/Syncfusion.SfPdfViewer.Android.StampAnnotationSelectedEventArgs.html#Syncfusion_SfPdfViewer_Android_StampAnnotationSelectedEventArgs_CustomStampView) property. The stamp view, thus retrieved, is the same instance as the one added using the [`AddStamp`](https://help.syncfusion.com/cr/xamarin-android/Syncfusion.SfPdfViewer.Android.SfPdfViewer.html#Syncfusion_SfPdfViewer_Android_SfPdfViewer_AddStamp_Android_Views_View_System_Int32_) method. + +Refer to the following code example. The [`StampAnnotationSelected`](https://help.syncfusion.com/cr/xamarin-android/Syncfusion.SfPdfViewer.Android.SfPdfViewer.html#Syncfusion_SfPdfViewer_Android_SfPdfViewer_ShapeAnnotationSelected) event is shown for illustration purposes. + +{% tabs %} +{% highlight c# %} + +pdfViewerControl.StampAnnotationSelected += PdfViewerControl_StampAnnotationSelected; + +private void PdfViewerControl_StampAnnotationSelected(object sender, StampAnnotationSelectedEventArgs e) + { + //Retrieves the actual view added as the stamp using the AddStamp method. + var customStamp = e.CustomStampView; + } + +{% endhighlight %} +{% endtabs %}