wpf-devexpress-dot-xpf-dot-pdfviewer-dot-pdfviewercontrol-667536af.md
Gets or sets the background color of the selected text. This is a dependency property.
Namespace : DevExpress.Xpf.PdfViewer
Assembly : DevExpress.Xpf.PdfViewer.v25.2.dll
NuGet Package : DevExpress.Wpf.PdfViewer
public Color HighlightSelectionColor { get; set; }
Public Property HighlightSelectionColor As Color
| Type | Description |
|---|---|
| Color |
A Color structure.
|
The following example uses a semi-transparent red as the text highlighting color. You can specify the color’s alpha component to change the transparency value:
<Window
xmlns:dxpdf="http://schemas.devexpress.com/winfx/2008/xaml/pdf" ...>
<Grid>
<dxpdf:PdfViewerControl x:Name="Viewer" HighlightSelectionColor="#5FFF0000"/>
<!--or-->
<dxpdf:PdfViewerControl x:Name="Viewer2">
<dxpdf:PdfViewerControl.HighlightSelectionColor>
<Color A="50" R="255" G="0" B="0" />
</dxpdf:PdfViewerControl.HighlightSelectionColor>
</dxpdf:PdfViewerControl>
</Grid>
</Window>
In code, you can call the Color.FromArgb method to set the HighlightSelectionColor:
Viewer.HighlightSelectionColor = System.Windows.Media.Color.FromArgb(50, 255, 0, 0);
Viewer.HighlightSelectionColor = System.Windows.Media.Color.FromArgb(50, 255, 0, 0)
See Also