I have the following XAML code for Windows Phone 8.1 (non SilverLight):
<Grid>
<ToggleButton Name="TogBtn" VerticalAlignment="Center" HorizontalAlignment="Center" Checked="ToggleButton_OnChecked">
<SymbolIcon Symbol="play"></SymbolIcon>
</ToggleButton>
</Grid>
The output of the above code is:
How can I change the icon to a stop
icon when the toggle button is checked and then back to play
icon when unchecked?
I thought this would be easy to find through Google, but apparently not.
Please change your XAML to this:
And please add this to your .cs file:
That should do the job!