Condividi tramite


TextDecoration.Location Proprietà

Definizione

Ottiene o imposta la posizione verticale in corrispondenza della quale viene disegnata la decorazione del testo.

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

Valore della proprietà

Posizione verticale in corrispondenza della quale viene disegnata la decorazione del testo.

Esempio

Nell'esempio di codice seguente viene creata una decorazione di testo barrato con un pennello a tinta unita per la penna. La proprietà Location è impostata su 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>

Commenti

Nell'esempio seguente vengono illustrate le posizioni delle decorazioni di testo relative al testo.

Diagramma delle posizioni delle decorazioni del testo Diagramma Esempio di tipi di decorazione del testo

La PenOffset proprietà consente di sfalsare la decorazione del testo dall'oggetto specificato Location.

Informazioni sulle proprietà di dipendenza

Elemento Valore
Campo Identificatore LocationProperty
Proprietà dei metadati impostate su true Nessuno

Si applica a