Reputation: 7900
I have a button with image:
<Button x:Name="favoriteButton"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Height="72"
Width="99"
Click="DidPressAddToFavorites"
BorderBrush="{x:Null}">
<Button.Background>
<ImageBrush ImageSource="/Images/[email protected]"
Stretch="Uniform"/>
</Button.Background>
</Button>
Now when i press the button i see a blue background on him, can i remove this blue?
Upvotes: 1
Views: 261
Reputation: 10310
There colors and animations are stored in the template of the button. You'll have to edit this template. Using Blend you can do this by right-clicking on the button on the artboard or in the objects and timeline panel. And go to "Edit Template" --> "Edit a Copy"
After this you'll have to set a place to store the template. You can choose to place the template in an external ResourceDictionary, or just leave it in this page if it's only used here.
Now that you have a template you can edit this.
The blue color you are talking about is defined in one of the 4 "CommonStates". These states can be found on the States panel. By selecting one of the states you can edit that one. Every change you make to one of the properties will be stored in a state.
As you can see below, the Pressed state is selected. This is indicated by the little red dot in front of the state. You'll also be notified on the artboard.
Every object that has some properties changed in this state is highlighted with a red dot in the object and timeline panel also. The properties that have changes in a specific state are indicated with a star in this panel.
The blue stuff can be found in the Background element of the template.
Upvotes: 1