TextDecoration.Location Propriété

Définition

Obtient ou définit l'emplacement vertical sur lequel la décoration de texte est dessinée.

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

Valeur de propriété

TextDecorationLocation

L'emplacement vertical sur lequel la décoration de texte est dessinée.

Exemples

Dans l’exemple de code suivant, une décoration de texte barré est créée avec un pinceau de couleur unie pour le stylet. La propriété Location est définie sur 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>

Remarques

L’exemple suivant montre les emplacements des décorations de texte par rapport au texte.

Diagramme des emplacements de décoration de texte
Exemple de types de décoration de texte

La PenOffset propriété vous permet de décaler la décoration de texte de l’élément spécifié Location.

Informations sur les propriétés de dépendance

Champ d’identificateur LocationProperty
Propriétés de métadonnées définies sur true Aucun

S’applique à