c# - WPF: ControlTemplate vs Style that Changes Template -


inside app.xaml may have:

<style targettype="{x:type button}" x:key="roundbutton">   <setter property="template">      <setter.value>         <controltemplate target="{x:type button}">             bla bla bla...         </controltemplate>      </setter.value>   </setter> </style> 

vs. going

<controltemplate target="{x:type button}" x:key="roundbutton">     bla bla bla... </controltemplate> 

i'm confused, should use / what's difference?

using style change other values of button @ same time. using controltemplate can change template. appropriate?


Comments

Popular posts from this blog

Javascript line number mapping -

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

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