wpf - What wrong with this Template -


i using datatrigger change datatemplate based on enum.

<treeview >     <treeview.resources>         <hierarchicaldatatemplate datatype="{x:type model:card}" itemssource="{binding reqs}">             <stackpanel verticalalignment="center">                 <textblock text="{binding label}" fontweight="bold" foreground="gray" horizontalalignment="stretch" verticalalignment="center" fontsize="15"/>                 <textblock text="{binding reqs.count}" fontweight="ultralight" foreground="gray" horizontalalignment="stretch" verticalalignment="center" fontsize="10"/>             </stackpanel>         </hierarchicaldatatemplate>          <datatemplate datatype="{x:type model:reqcard}">             <contentcontrol>                 <contentcontrol.style>                     <style targettype="{x:type contentcontrol}">                         <setter property="contenttemplate">                             <setter.value>                                 <datatemplate >                                     <border width="340" background="lightblue">                                         <grid name="pgrid" margin="5">                                             <grid.columndefinitions>                                                 <columndefinition width="*"/>                                                 <columndefinition width="auto"/>                                             </grid.columndefinitions>                                             <textblock margin="2" text="{binding label}" foreground="gray" fontsize="15" fontweight="normal"/>                                             <checkbox grid.column="1" margin="2" ischecked="{binding ismeet}" click="ismeet_onclick"/>                                         </grid>                                     </border>                                 </datatemplate>                             </setter.value>                         </setter>                         <style.triggers>                             <datatrigger binding="{binding demandtype}" value="{x:static enums:demandtype.condition}">                                 <setter property="contenttemplate">                                     <setter.value>                                         <datatemplate >                                             <border width="340" background="lightblue" >                                                 <grid name="kgrid" margin="5">                                                     <grid.columndefinitions>                                                         <columndefinition width="*"/>                                                         <columndefinition width="auto"/>                                                     </grid.columndefinitions>                                                     <textblock margin="2" text="{binding label}" foreground="gray" fontsize="15" fontweight="normal"/>                                                     <textbox grid.column="1" width="20" margin="2" text="{binding condition}" click="condition_onclick"/>                                                 </grid>                                             </border>                                         </datatemplate>                                     </setter.value>                                 </setter>                             </datatrigger>                         </style.triggers>                     </style>                 </contentcontrol.style>             </contentcontrol>         </datatemplate>     </treeview.resources> </treeview> 

it displays no data.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -