visual studio - How to dynamically set color properties of a button for Windows Phone 8.1 -


this question has answer here:

i want change button's foreground color every time press button , restore color original when lift finger.

how should implement that?

i trying key_down , key_up events, using solidcolorbrush, solidcolorbrush doesn't accept "color" parameter , reports error: "the name 'color' not exist in current context".

(the parameter list)
enter image description here

thank you!

to set color in code in windows phone 8.1 rt try below.

(sender button).foreground = new windows.ui.xaml.media.solidcolorbrush(windows.ui.colors.red) 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -