Previous month:
May 2008
Next month:
October 2008

June 2008

WPF TextBlock Strikethrough

Scott Hanselman is looking for WPF TextBlock with stroke text.
With WPF this is a really easy and flexible task to do. What needs to be done is to set the Decorations of the TextBlock:

<TextBlock FontSize="18">
  <TextBlock.TextDecorations>
    <TextDecoration Location="Strikethrough">
      <TextDecoration.Pen>
        <Pen Brush="Red" />
      </TextDecoration.Pen>
    </TextDecoration>
  </TextBlock.TextDecorations>
  Sample
</TextBlock>

Christian