Simple ON/OFF toggle button with image
<p>I'm working on a WinForms project where I'm trying to create an ON/OFF toggle button that uses two separate images (both located in project resources) for both the "ON" setting, and the "OFF" setting.</p>

<p>Based on what I've found online, I've used a <code>CheckBox</code> with its appearance set to "Button".</p>

<p>Here is the code I've got so far for my button:</p>

<pre><code>    private void ToggleButton_CheckedChanged(object sender, EventArgs e)
    {
        if (ToggleButton.Checked)
        {
            ToggleButton.BackgroundImage.Equals(Properties.Resources.ToggleButton_ON);
        }
        else
        {
            ToggleButton.BackgroundImage.Equals(Properties.Resources.ToggleButton_OFF);
        }
    }
</code></pre>

<p>For some reason nothing happens when I click on the button, and I'm not sure what I've done wrong here.</p>

<p>Basically, I'd like the background image to cycle back and fourth between <code>ToggleButton_ON</code> and <code>ToggleButton_OFF</code> when the user clicks on the button.</p>