c# - round combo box border -
friends find code make round combo box don't know how use
is there 1 can how use code
<style targettype="{x:type combobox}"> <setter property="template"> <setter.value> <controltemplate targettype="{x:type combobox}"> <border cornerradius="5"> </border> </controltemplate> </setter.value> </setter> </style> what should apply code combo box in wpf
this template showing here basic idea, not working. need override full default template , customize needs. inside of usercontrol’s resources ass template (just copy , paste) link default combobox template
<usercontrol.resources> <!-- paste code here--> <!--control colors.--> <color x:key="windowcolor">#ffe8edf9</color> <color x:key="contentareacolorlight">#ffc5cbf9</color> <color x:key="contentareacolordark">#ff7381f9</color> …. <controltemplate x:key="comboboxtogglebutton" targettype="{x:type togglebutton}"> …. </usercontrol.resources> modify border radius in 2 places: … grid.columnspan="2" cornerradius="<put new radius here, example 20>" borderthickness="1"> … , here <border grid.column="0" cornerradius="<new value, example 20>,0,0,<new value, example 20>" margin="1" > this should it. since did not specify key name template combobox should pick new template automatically.
Comments
Post a Comment