Latest source merged from Syncfusion

This commit is contained in:
pipeline 2020-12-16 20:42:51 -08:00
Родитель 5f17266583
Коммит 042454aa46
2 изменённых файлов: 36 добавлений и 1 удалений

Просмотреть файл

@ -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.

Просмотреть файл

@ -153,4 +153,24 @@ When you select the custom stamp annotation, delete icon will appear on the bott
pdfViewer.StampAnnotationRemoved += PdfViewer_StampAnnotationRemoved;
{% endhighlight %}
{% endtabs %}
{% 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 %}