SelectionOpacity Property

FlowDocumentPageViewer.SelectionOpacity Property

.NET Framework 4.6 and 4.5

Gets or sets the opacity of the SelectionBrush.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public double SelectionOpacity { get; set; }

Property Value

Type: System.Double

The opacity of the SelectionBrush. The default is 0.4.

If you set the SelectionOpacity to 0, the SelectionBrush is transparent and is not visible. If you set the SelectionOpacity to 1.0 or greater, the SelectionBrush is opaque and the selected text is not visible.

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

.NET Framework
Available since 4.0
Return to top
© 2015 Microsoft