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
Post a Comment