TextPattern.SupportedTextSelection Свойство

Определение

Получает значение, указывающее, поддерживает ли поставщик текста выделение, и если да, то какого типа.

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

Значение свойства

Одно из значений перечисления SupportedTextSelection.

Примеры

// 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

Применяется к

См. также раздел