TextDecoration.Location Свойство

Определение

Возвращает или задает вертикальное расположение, в котором рисуется украшение текста.

public:
 property System::Windows::TextDecorationLocation Location { System::Windows::TextDecorationLocation get(); void set(System::Windows::TextDecorationLocation value); };
public System.Windows.TextDecorationLocation Location { get; set; }
member this.Location : System.Windows.TextDecorationLocation with get, set
Public Property Location As TextDecorationLocation

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

Вертикальное расположение, в котором рисуется декорирование текста.

Примеры

В следующем примере кода создается зачеркнутое текстовое украшение сплошной кистью цвета для пера. Для свойства Location задано значение Strikethrough.

// Use the default font values for the strikethrough text decoration.
private void SetDefaultStrikethrough()
{
    // Set the underline decoration directly to the text block.
    TextBlock1.TextDecorations = TextDecorations.Strikethrough;
}
' Use the default font values for the strikethrough text decoration.
Private Sub SetDefaultStrikethrough()
    ' Set the underline decoration directly to the text block.
    TextBlock1.TextDecorations = TextDecorations.Strikethrough
End Sub
<!-- Use the default font values for the strikethrough text decoration. -->
<TextBlock
  TextDecorations="Strikethrough"
  FontSize="36" >
  The quick red fox
</TextBlock>

Комментарии

В следующем примере показаны расположения украшений текста относительно текста.

Схема расположений Пример типов оформления текста

Свойство PenOffset позволяет смещать украшение текста из указанного Location.

Сведения о свойстве зависимостей

Элемент Ценность
Поле идентификатора LocationProperty
Свойства метаданных, равные свойству true None

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