Language

FlowDocumentPageViewer.Selection Property

Definition

Gets the selected content of the FlowDocumentPageViewer.

public:
 property System::Windows::Documents::TextSelection ^ Selection { System::Windows::Documents::TextSelection ^ get(); };
public System.Windows.Documents.TextSelection Selection { get; }
member this.Selection : System.Windows.Documents.TextSelection
Public ReadOnly Property Selection As TextSelection

Property Value

The selected content of the FlowDocumentPageViewer.

Examples

The following example shows how to get the text that a user has selected in the FlowDocumentPageViewer.


    
private void ShowSelection_Click(object sender, RoutedEventArgs e)
{
    MessageBox.Show(flowdocPageViewer1.Selection.Text);
}
Private Sub ShowSelection_Click(ByVal sender As System.Object, _
                                ByVal e As System.Windows.RoutedEventArgs)

    MessageBox.Show(flowdocPageViewer1.Selection.Text)

End Sub

Remarks

Selection is introduced in the .NET Framework version 3.5. For more information, see Versions and Dependencies.

Applies to