WPF ToggleButton strikethrough text when IsClicked

In WPF XAML I want to make a ToggleButton which when pressed adds a strikethrough to the text.

I've seen:
Changing the Text on a ToggleButton When a User Clicks On It

Problem is Strikethrough needs to be applied to the underlying TextBlock, not the Togglebutton.
Who is Participating?
Chris StanyonConnect With a Mentor Commented:
Take a look at this:

        <Style TargetType="{x:Type ToggleButton}">
            <Setter Property="Content" Value="Disarmed" />
                <Trigger Property="IsChecked" Value="True">
                    <Setter Property="Content">
                            <TextBlock Text="Armed" TextDecorations="Strikethrough" />

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.