TextPattern.SupportedTextSelection Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that specifies whether a text provider supports selection and, if so, the type of selection supported.
public:
property System::Windows::Automation::SupportedTextSelection SupportedTextSelection { System::Windows::Automation::SupportedTextSelection get(); };
public System.Windows.Automation.SupportedTextSelection SupportedTextSelection { get; }
member this.SupportedTextSelection : System.Windows.Automation.SupportedTextSelection
Public ReadOnly Property SupportedTextSelection As SupportedTextSelection
Property Value
One of the SupportedTextSelection values.
Examples
// Does target range support text selection?
if (targetTextPattern.SupportedTextSelection ==
SupportedTextSelection.None)
{
targetResult.Content = "Unable to select text.";
targetResult.Background = Brushes.Salmon;
return;
}
// Does target range support multiple selections?
if (targetTextPattern.SupportedTextSelection ==
SupportedTextSelection.Multiple)
{
targetResult.Content = "Multiple selections present.";
targetResult.Background = Brushes.Salmon;
return;
}
' Does target range support text selection?
If targetTextPattern.SupportedTextSelection = SupportedTextSelection.None Then
targetResult.Content = "Unable to select text."
targetResult.Background = Brushes.Salmon
Return
End If
' Does target range support multiple selections?
If targetTextPattern.SupportedTextSelection = SupportedTextSelection.Multiple Then
targetResult.Content = "Multiple selections present."
targetResult.Background = Brushes.Salmon
Return
End If
Applies to
See also
Werk met ons samen op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en bekijken. Raadpleeg onze gids voor inzenders voor meer informatie.