开发者

Windows phone 7: button click, background and text-color, why?

i have my butto开发者_开发百科n:

completely trasparent, text in white. But when i click it, the background goes white and the text black, and it seems to move up :-| i want only execute the action, i don't want those strange effects. any ideas? thanks!


That's the default behaviour of Button control, if you want to avoid it you have some options:

  1. Use another control like textBlock and use OnMouseLeftButtonDown/Up

  2. Customize the template of your button: See the link bellow, this is default style of a button, you can copy/paste the Template part and modify it as you want. (You need to play with different visual states)

http://msdn.microsoft.com/en-us/library/cc278069(v=vs.95).aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜