共用方式為


FlowDocumentPageViewer.SelectionOpacity 屬性

定義

取得或設定 的不透明度 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。

範例

以下範例會產生一個 FlowDocumentPageViewer,將屬性設 SelectionBrush 為粉紅色,並將屬性設 SelectionOpacity 為 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>

備註

如果你把 設 SelectionOpacity 為 0,那就是 SelectionBrush 透明且看不到。 如果你把 設定 SelectionOpacity 為 1.0 或以上,畫面 SelectionBrush 會變得不透明,選取的文字不會顯示。

適用於