Skip to main content
A newer version of this page is available.
All docs
V19.1

PdfTextMarkupAnnotationCreatingEventArgs.Color Property

Specifies the markup annotation color and transparency.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v19.1.dll

Declaration

public Color Color { get; set; }

Property Value

Type Description
Color

A Color value that specifies the markup annotation color and transparency.

Remarks

To specify the transparency of a markup annotation color, use the Color.A property (0 is fully transparent, and 255 is fully opaque).

Example

This example shows how to create a text markup annotation that highlights a selected text.

using System.Drawing;
using System.Windows.Forms;

namespace CreateMarkupAnnotation {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();

            // Load a document.
            pdfViewer1.LoadDocument("..\\..\\Demo.pdf");

            // Select the document area where the markup annotation will be created.
            pdfViewer1.Select(new RectangleF(-230, 420, 1240, 150));

            // Highlight a selected text.
            pdfViewer1.HighlightSelectedText();
        }
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Color property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also