This article was translated by machine. To view in the article in English, select the English check box. You can also display the English text in a popup window by moving the mouse pointer over the text.
This documentation is archived and is not being maintained.

FlowDocumentPageViewer.Selection الخاصية

Visual Studio 2010

Gets the محدد محتوى of the FlowDocumentPageViewer.

مساحة الاسم:  System.Windows.Controls
التجميع:  PresentationFramework (في PresentationFramework.dll)

public TextSelection Selection { get; }

قيمة الخاصية

النوع: System.Windows.Documents.TextSelection
The محدد محتوى of the FlowDocumentPageViewer.

Selection هو المقدمة في الإصدار 3.5 من برنامج.NET Framework. لمزيد من المعلومات، راجع هندسة .NET Framework 3.5.

The following مثال shows how إلى يحصل the نص that a مستخدم has محدد في the FlowDocumentPageViewer.

private void ShowSelection_Click(object sender, RoutedEventArgs e)


    <Button Content="Show Selection" Click="ShowSelection_Click"/>
    <FlowDocumentPageViewer Name="flowdocPageViewer1" 
        <FlowDocument ColumnWidth="400" 
            <Section FontSize="12">
                    <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.
                    Astronomers believe Neptune has an inner rocky core that is surrounded by a vast
                    ocean of water mixed with rocky material. From the inner core, this ocean extends
                    upward until it meets a gaseous atmosphere of hydrogen, helium, and trace amounts
                    of methane. Neptune has four rings and 11 known moons. Even though Neptune's volume
                    is 72 times Earth’s volume, its mass is only 17.15 times Earth’s mass. Because of
                    its size, scientists classify Neptune—along with Jupiter, Saturn, and Uranus—as
                    one of the giant or Jovian planets (so-called because they resemble Jupiter).
                    Mathematical theories of astronomy led to the discovery of Neptune. To account for
                    wobbles in the orbit of the planet Uranus, British astronomer John Couch Adams and
                    French astronomer Urbain Jean Joseph Leverrier independently calculated the existence
                    and position of a new planet in 1845 and 1846, respectively. They theorized that the
                    gravitational attraction of this planet for Uranus was causing the wobbles in Uranus’s
                    orbit. Using information from Leverrier, German astronomer Johann Gottfried Galle first
                    observed the planet in 1846.

نظام التشغيل Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, نظام التشغيل Windows Server 2003

لا يدعم .NET Framework و .NET Compact Framework كافة الإصدارات الخاصة بكل نظام أساسي. للحصول على قائمة بالإصدارات المدعمة، راجع متطلبات النظام إطار عمل .NET.

.NET Framework

مدعوم في: 4, 3.5 المزود بحزمة الخدمة SP1, 3.0 المزود بحزمة الخدمة SP1

NET Framework. Client Profile

مدعوم في: 4