FlowDocumentReader.SelectionOpacity 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置 SelectionBrush 的不透明度。
public:
property double SelectionOpacity { double get(); void set(double value); };
public double SelectionOpacity { get; set; }
member this.SelectionOpacity : double with get, set
Public Property SelectionOpacity As Double
属性值
SelectionBrush 的不透明度。 默认值为 0.4。
示例
以下示例创建 , FlowDocumentReader将 SelectionBrush 属性设置为粉色,并将 属性 SelectionOpacity 设置为 0.7。
<FlowDocumentReader 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>
</FlowDocumentReader>
注解
如果将 设置为 SelectionOpacity 0,则 SelectionBrush 为透明且不可见。 如果将 设置为 SelectionOpacity 1.0 或更高版本, SelectionBrush 则 为不透明且所选文本不可见。