Change circle background image of start-stop button on click in WPF

Inspired by this question . I will complicate this problem.

My goal is a circle button (with a background image like this enter image description here). whick executes the start-stop button:

1) the first time you press the "change" button, the image of the button "stops" and the calculation function starts (process, task, etc.).

2) press the button “Change button image” to the initial “initial” image and stop this function.

The button code is similar:

<Button  x:Name="btnStartStop" Width="72" Height="72" Content="" Margin="180,0,372,94" VerticalAlignment="Bottom" d:LayoutOverrides="VerticalAlignment">
        <Button.Template>
            <ControlTemplate>
                <Grid>
                    <Ellipse>
                        <Ellipse.Fill>
                            <ImageBrush ImageSource="Images/Start.jpg"/>
                        </Ellipse.Fill>
                    </Ellipse>
                </Grid>
            </ControlTemplate>
        </Button.Template>
</Button>

Thank.

PS @Sheridan asked me to mention his name, maybe he can help me.

. , - ​​, , ( ). , , click. Ellipse.

+3
2

DataTrigger . .

WPF

- . .

enter image description here

enter image description here

+1

ToggleButton , , CheckBox.

, / . VisualStateManager, , .

0

All Articles