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?

enter image description here

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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -