Search code examples
windows-phone-7buttonclickimagesource

How can I get stop the button control in Windows Phone from making that ugly white flash when clicked?


So I have a few items in a list that I display on my MainPage. I have a button that looks like this:

<Button Grid.Column="1" Click="Button_Click" BorderThickness="0" Height="40">
     <Button.Background>
           <ImageBrush ImageSource="/WindowsPhonePanoramaApplication2;component/Images/appbar.feature.email.rest.png" Stretch="None" />
     </Button.Background>
</Button>

Every time I click on it, the image disappears under this bright white rectangle. I'd rather have it display another image instead. How can I achieve this?

Thanks for looking


Solution

  • To do this you'll need to retemplate the button to use a different visual state when clicked.

    See also these following image button controls/alternatives: