Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FlowDocumentPageViewer.SelectionBrush Property

Gets or sets the brush that highlights the selected text.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
public Brush SelectionBrush { get; set; }

Property Value

Type: System.Windows.Media.Brush
A brush that highlights the selected text.

You can specify the brush that highlights selected text in a FlowDocumentPageViewer by setting the SelectionBrush and the SelectionOpacity properties..

The following example creates a FlowDocumentPageViewer, sets the SelectionBrush property to pink, and sets the SelectionOpacity property to 0.7.

<FlowDocumentPageViewer SelectionBrush="Pink" SelectionOpacity="0.7">
    <FlowDocument>
        <Paragraph>
            <Bold>Neptune</Bold> (planet), major planet in the solar system, eighth planet
from the Sun and fourth largest in diameter.  Neptune maintains an almost constant
distance, about 4,490 million km (about 2,790 million mi), from the Sun.  Neptune
revolves outside the orbit of Uranus and for most of its orbit moves inside the
elliptical path of the outermost planet Pluto (see Solar System). Every 248 years,
Pluto’s elliptical orbit brings the planet inside Neptune’s nearly circular orbit
for about 20 years, temporarily making Neptune the farthest planet from the Sun.
The last time Pluto’s orbit brought it inside Neptune’s orbit was in 1979. In
1999 Pluto’s orbit carried it back outside Neptune’s orbit.
        </Paragraph>
    </FlowDocument>
</FlowDocumentPageViewer>

.NET Framework

Supported in: 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.