WPF how to restore Button background color -
this question felt simple can't find answer:
how change button default? vs2010 start giving me button strange color , have manually set button default self.
i tried:
btn.background = null; // make transparent, not default background
anyone?
use clearvalue-method restore default.
btn.clearvalue(button.backgroundproperty);
or
btn.clearvalue(control.backgroundproperty);
this sets background-property of button. if have changed buttons template, not help. in case, explicit declarations of button.template-property or style sets button.template-property. in app.xaml if there
<style targettype="button"> ... </style>
or
<style targettype="{x:type button}"> ... </style>
Comments
Post a Comment