TextDecoration.Location Propiedad

Definición

Obtiene o establece la ubicación vertical donde se dibuja la decoración de texto.

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

Valor de propiedad

TextDecorationLocation

Ubicación vertical donde se dibuja la decoración de texto.

Ejemplos

En el siguiente ejemplo de código, se crea una decoración de texto tachado con un pincel de color sólido para el lápiz. La propiedad Location está establecida en 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>

Comentarios

En el ejemplo siguiente se muestran las ubicaciones de las decoraciones de texto relativas al texto.

Diagrama de ubicaciones de decoraciones de texto
Ejemplo de tipos de decoración de texto

La PenOffset propiedad permite desplazar la decoración de texto del especificado Location.

Información sobre propiedades de dependencia

Campo identificador LocationProperty
Propiedades de metadatos establecidas en true Ninguno

Se aplica a