expanded event to TreeView wpf -


i have treeview hierarchicaldatatemplate, , want add expanded event

<treeview name="files" margin="0,0,569,108" grid.row="1" itemssource="{binding s1}">                         <treeview.itemtemplate>                             <hierarchicaldatatemplate itemssource="{binding members}">                                 <stackpanel orientation="horizontal">                                     <textblock text="{binding name}" />                                                               </stackpanel>                                 <hierarchicaldatatemplate.itemtemplate>                                     <datatemplate>                                         <checkbox name="checkbox111" checked="filecheckbox_checked" unchecked="filecheckbox_unchecked" ischecked="{binding c}"/>                                     </datatemplate>                                 </hierarchicaldatatemplate.itemtemplate>                             </hierarchicaldatatemplate>                          </treeview.itemtemplate>                     </treeview> 

how can add event expanded? thanks

you can do:

in xaml:

<treeview ... treeviewitem.expanded="treeviewitem_expanded" />

code behind:

public void treeviewitem_expanded(object s, routedeventargs e) {...}


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -