2011-02-20 6 views

Répondre

0

Lire this thread, quelqu'un a également posté une solution là-bas.

+0

valeur d'attribut non valide pour TextDecorations de Strikethrough propriété. [Ligne: 33 Position: 28] – Marcom

+0

@Msrcom Désolé, j'ai édité ma réponse –

+0

Code a besoin d'un peu plus d'affinage mais il fait son travail. Merci – Marcom

2

Il n'existe pas de méthode intégrée pour ce faire.
La seule alternative est de tracer une ligne dans la même position que le texte vous-même.

2

Un petit exemple simple:

<Grid HorizontalAlignment="Left" VerticalAlignment="Top"> 
      <Grid.RowDefinitions> 
       <RowDefinition Height="1*"/> 
       <RowDefinition Height="1*"/> 
      </Grid.RowDefinitions> 
     <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Some text" VerticalAlignment="Top" Grid.RowSpan="2"/> 
     <Border BorderThickness="0,0,0,1" BorderBrush="#FF949494" > 
     </Border> 
     </Grid>