c# - How to set default template for button? -



c# - How to set default template for button? -

i have this:

btn.template = (controltemplate)this.findresource("temp1");

but want default template, how this? i've tried:

btn.template = null button b = new button(); btn.template = b.template; controltemplate ct = new controltemplate(typeof(button)); btn.template = ct;

but button doesn't appear.

you need clone default template. check code cloning. http://siderite.blogspot.com/2010/12/cloning-controltemplate.html

c# wpf templates

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -