c# - Why button changes color when I click or hover on it? Xaml windows 8 -
i have created button using xaml , have defined simple properties it.
<button name="btnnext" grid.row="1" content="para" width="200" grid.column="1" background="#ff2d2d2d" horizontalalignment="right" fontsize="40" height="380" borderthickness="0" />
it happens when click on button or put mouse over, changes color. have tried escape behaviour in btnnext_click method not affect anything.
private void btnnext_click(object sender, routedeventargs e) { button button = sender button; if (button != null) { button.background = new solidcolorbrush(hextocolorconvertor("#ff2d2d2d")); start_point += (uint)number_of_buttons1; readfile(start_point); } }
does have idea how resolve this?
in xaml, button have default style different states normal, mouseover, pressed etc.. whenever button moves 1 state another, changes using default style obviously. can find more information related default style here
now, if want override default behavior, can expression-blend. more of can found here , here
hope information you.. :)
Comments
Post a Comment