开发者

Changing click behaviour

When a Button having Content / Text 'ClickMe' is clicked, 'ClickMe' text is automatically arranged to foreground of the button. But when user clicks the button having image on its background, background image becomes invisible & the foreground of button looks fully white. Can we see the image on foreground instead of white color.

Is there any chance to change the foregr开发者_JAVA技巧ound effect of the button when user clicks on button?

My Code "Button Height="128" HorizontalAlignment="Left" Margin="307,138,0,0" Name="button2" VerticalAlignment="Top" Width="150" BorderThickness="1">

"Button.Background>

ImageBrush ImageSource="/WinApp;component/Icons/camerabtn.png" />

/Button.Background>

/Button>"

Thanks in advance to all.


To do this you need to change the style of the button.

Easiest way to do that is in Expression Blend.

See this answer: Windows Phone 7 (WP7) Change a button's background color on click


As Mick suggests, it would help to see some code for what you're trying to do, however, it sounds like you may have a change in a value (such as margin) in the Normal and Pressed states of the button resulting in the behavior you are seeing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜