How to inherit default textbox style in wpf datagrid? -


i have textbox in datagridtemplatecolumn in wpf datagrid.it doesn't inherit , feel of datagrid itself.for example doesn't show alternating color, when row selected or edited.

       <datagridtemplatecolumn>             <datagridtemplatecolumn.celltemplate>                 <datatemplate>                     <textbox text="{binding ...}" />                                           </datatemplate>             </datagridtemplatecolumn.celltemplate>         </datagridtemplatecolumn> 

it looks style of default textbox overrides of datagrid.is there way use datagrids style?

just in case:-

 <datagrid background="white" alternatingrowbackground="#bcd2ee"         <datagrid.cellstyle>                             <style targettype="datagridcell">                                 <style.triggers>                                     <trigger property="isselected" value="true">                                         <setter property="borderbrush" value="transparent" />                                         <setter property="background" value="transparent" />                                     </trigger>                                 </style.triggers>                             </style>                         </datagrid.cellstyle> .... ..... ....     </datagrid> 

this used once can set property according requirements.

this might ..:)


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -