---
title: "Add, Edit, and Delete Cloud Shapes in PDF Files with Ease in WPF"
published_at: "2021-07-23T10:47:59+00:00"
modified_at: "2026-07-01T06:57:07+00:00"
url: "https://www.syncfusion.com/blogs/post/add-edit-delete-cloud-shapes-in-pdf-files-wpf"
excerpt: "From the 2021 Essential Studio® Volume 2 release, the WPF PDF Viewer comes with exciting support for drawing cloud shapes in PDF files. As per the PDF specification, cloud shapes are nothing but a polygon or rectangle annotation with a..."
taxonomy_category:
  - "Desktop"
  - "PDF"
  - "What's new"
  - "WPF"
taxonomy_post_tag:
  - "Annotation"
  - "PDF Viewer"
  - "Review PDF"
  - "What's New"
  - "WPF"
---

# Add, Edit, and Delete Cloud Shapes in PDF Files with Ease in WPF

[Deepak G](https://www.syncfusion.com/blogs/author/deepakgunasekaran)

![Add, Edit, and Delete Cloud Shapes in PDF Files with Ease in WPF](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Add-Edit-and-Delete-Cloud-Shapes-in-PDF-Files-with-Ease-in-WPF-1.png)


From the [2021 Essential Studio® Volume 2 release](https://www.syncfusion.com/forums/166800/essential-studio-2021-volume-2-main-release-v19-2-0-44-is-available-for-download)
, the [WPF PDF Viewer](https://www.syncfusion.com/wpf-controls/pdf-viewer)
 comes with exciting support for drawing cloud shapes in PDF files. As per the PDF specification, cloud shapes are nothing but a polygon or rectangle annotation with a cloud border style. You can view, add, remove, and modify cloud shapes in PDF files interactively using the WPF PDF Viewer.  
Add Seamless PDF Viewing to WPF Apps

Embed a fast, secure PDF viewer into your WPF apps with Syncfusion WPF PDF Viewer SDK. Display documents accurately, navigate pages, search text, annotate PDFs, fill forms, and handle large files with smooth performance.

[Add WPF PDF Viewer](https://www.syncfusion.com/pdf-viewer-sdk/wpf-pdf-viewer)

In this blog, we will look at the procedure to handle cloud shapes in PDF files using the WPF PDF Viewer.

![A polygon with cloud border style in PDF file](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Polygon-with-cloud-border-style.png)

A polygon with cloud border style


## Getting started

First things first:

1. [Create a new WPF project](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/getting-started/walkthrough-my-first-wpf-desktop-application) and install the [WPF PDF Viewer NuGet package](https://www.nuget.org/packages/Syncfusion.PdfViewer.WPF/) .
2. Then, include the following code in your XAML page to add the PDF Viewer as a child to the window.``` <Window x:Class="PdfViewer.MainWindow" xmlns:pdfviewer="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"> <pdfviewer:PdfViewerControl x:Name="pdfViewer"/> </Window> ```

## Add cloud shapes from the UI

Using the [PdfViewerControl](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerControl.html)
, you can directly add cloud shapes by selecting the cloud from the shapes in the built-in toolbar.

![Selecting cloud from the PDF Vewer WPF toolbar](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Selecting-cloud-from-toolbar.png)

Selecting cloud from the toolbar

Once the cloud is chosen from the toolbar, click on the page to start creating a cloud. Move the pointer where you want them and click to create each segment. To finish drawing the cloud, double-click to end the cloud shape. Later, you can select and move them to adjust their location, or resize the cloud using its segment connection points to adjust its size.

The following image illustrates the appearance of a selected cloud and its segment connected points.

![Cloud in the selected state](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Cloud-in-selected-state.png)

Cloud in the selected state

**Note:** For complex cloud polygons, the cloud border-style appearance might differ from other PDF readers like Adobe.


## Enable cloud-shape drawing mode programmatically

If you are using the [PdfDocumentView](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html)
 control and need to switch to the cloud-shape drawing mode, you need to set the [AnnotationMode](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfDocumentView.html#Syncfusion_Windows_PdfViewer_PdfDocumentView_AnnotationMode)
 to Polygon or Rectangle, and the [BorderEffect](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerPolygonSettings.html#Syncfusion_Windows_PdfViewer_PdfViewerPolygonSettings_BorderEffect)
 settings to Cloudy.

Refer to the following code example to enable cloud-shape drawing mode.

```
public void EnableCloudDrawingMode()
{
   pdfViewer.AnnotationMode = PdfViewerAnnotationMode.Polygon;
   pdfViewer.PolygonAnnotationSettings.BorderEffect = BorderEffect.Cloudy;
}
```

## Remove cloud shapes

You can remove a cloud annotation by **selecting** and**right-clicking the cloud shape**. Choose ** Delete** from the context menu. You can also delete the selected annotation using the ** DELETE** keyboard key.

![Delete cloud annotation in PDF Viewer WPF](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Delete-cloud-annotation.png)

Delete cloud annotation

## Customize the properties of cloud shapes

You can customize the shape appearance, such as its color, thickness, opacity, and border style, using the properties window of the annotation. You can also modify the subject and author information of the annotation. To do so, open the properties window by **selecting** and**right-clicking on the cloud shape**, then choose the** Properties** from the context menu.

![Properties window](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Properties-window-1.png)

Properties window


## Customize the default appearance

If you need to create cloud shapes with a customized appearance, you can customize the default appearance using the [PolygonSettings](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.PdfViewer.PdfViewerPolygonSettings.html)
 of PDF Viewer.

Refer to the following code example to customize the default appearance of a cloud shape.

```
public void EnableDefaultCloudSettings()
{
    pdfViewer.AnnotationMode = PdfViewerAnnotationMode.Polygon;
    pdfViewer.PolygonAnnotationSettings.BorderEffect = BorderEffect.Cloudy;

    // Set the default appearance of the cloud.
    pdfViewer.PolygonAnnotationSettings.StrokeColor = Colors.Red;
    pdfViewer.PolygonAnnotationSettings.FillColor = Colors.White;
    pdfViewer.PolygonAnnotationSettings.Thickness = 2;
    pdfViewer.PolygonAnnotationSettings.Opacity = 0.5f;

}
```

The following image illustrates the customized appearance of a cloud shape.

![The customized appearance of cloud](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Customized-appearance-of-cloud.png)

The customized appearance of cloud

## Pop-up note

Also, you can write custom notes for the annotation by using the pop-up note associated with the annotation. The pop-up note of the cloud annotation can be opened by **selecting and right-clicking on the cloud shape** and then choosing**Open Pop-up Note** from the context menu.

![Pop-up note](https://www.syncfusion.com/blogs/wp-content/uploads/2021/07/Pop-up-note.png)

Pop-up note

## Keyboard shortcuts summary

The following shortcut keys can be used with the cloud shape annotations:

- **CTRL + Z**: Undo the changes.
- **CTRL + Y**: Redo the changes.
- **ESCAPE**: Cancel the current cloud-shape drawing, which is in progress; (or) deselect the annotation if it is selected; (or) reset the cloud annotation mode; (or) close the properties window or pop-up note if it is open. One of these operations will be performed based on the priority order.
- **Up, down, right, left (direction keys)**: Move the cloud up, down, right, and left, respectively.
- **Delete**: Delete the selected annotation.

## Resource

For more information, refer to [cloud shape annotations in WPF PDF Viewer](https://github.com/SyncfusionExamples/WPF-PDFViewer-Examples/tree/master/Annotations/Cloud)
.


## Conclusion

Thank you for reading this blog. I hope that you enjoyed learning about how to add, remove, and modify cloud shapes in your PDF files using the Syncfusion [WPF PDF Viewer](https://www.syncfusion.com/wpf-controls/pdf-viewer)
. Try using our PDF Viewer in your application and let us know what you think in the comment section below. This feature is available in our [2021 Volume 2](https://www.syncfusion.com/forums/166800/essential-studio-2021-volume-2-main-release-v19-2-0-44-is-available-for-download)
 release. To see all the updates in this release, please check out our [Release Notes](https://help.syncfusion.com/common/essential-studio/release-notes/v19.2.0.44)
 and [What’s New](https://www.syncfusion.com/products/whatsnew)
 pages.

If you are not a customer yet, you can start a 30-day [free trial](https://www.syncfusion.com/downloads)
 to check out these features.

If you wish to send us feedback or would like to submit any questions, you can contact us through our [support forum](https://www.syncfusion.com/forums)
, [feedback portal](https://www.syncfusion.com/feedback)
, or [Direct-Trac support system](https://www.syncfusion.com/support/directtrac/incidents)
. We are always happy to assist you!

## Reference links

- [Polygon annotation](https://help.syncfusion.com/wpf/pdf-viewer/working-with-annotations/shape-annotations#polygon-annotation)
- [Rectangle annotation](https://help.syncfusion.com/wpf/pdf-viewer/working-with-annotations/shape-annotations#rectangle-annotation)
- [Cloud-border style](https://help.syncfusion.com/wpf/pdf-viewer/working-with-annotations/shape-annotations#border-styles)

## Related blogs

- [How to Redact Confidential Data Permanently from PDF Files in WPF](https://www.syncfusion.com/blogs/post/redact-confidential-data-permanently-from-pdf-files-in-wpf.aspx)
- [Rotate, Remove, and Rearrange PDF Pages Easily with WPF PDF Viewer](https://www.syncfusion.com/blogs/post/rotate-remove-and-rearrange-pdf-pages-easily-with-wpf-pdf-viewer.aspx)
- [Problems Applying Right-to-Left Rendering in WPF PDF Viewer?](https://www.syncfusion.com/blogs/post/problems-applying-right-to-left-rendering-in-wpf-pdf-viewer.aspx)
- [PDF to Image Conversion is Made Easy with WPF PDF Viewer](https://www.syncfusion.com/blogs/post/pdf-to-image-conversion-is-made-easy-with-wpf-pdf-viewer.aspx)
