TextDecoration.Location Vlastnost

Definice

Získá nebo nastaví svislé umístění, ve kterém je text dekorace nakreslena.

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

Hodnota vlastnosti

TextDecorationLocation

Svislé umístění, ve kterém je text dekorace nakreslena.

Příklady

V následujícím příkladu kódu se vytvoří přeškrtnutá textová dekorace s plnou barvou štětce pera. Vlastnost Location je nastavena na hodnotu 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>

Poznámky

Následující příklad ukazuje umístění textových dekorací vzhledem k textu.

Diagram umístění pro dekoraci textu
Příklad typů textových dekorací

Vlastnost PenOffset umožňuje odsazení textu z zadané Location.

Informace o vlastnosti závislosti

Pole identifikátoru LocationProperty
Vlastnosti metadat nastavené na true Žádné

Platí pro