Silverlight 3 Datatemplate: Firing a button_click event -


i have datatemplate listbox stored in resourcedictionary. template contains button when clicked should pass listbox item seperate listbox

<datatemplate x:key="listboxcontentpresentertemplate">         <stackpanel orientation="horizontal">             <stackpanel height="75" width="100">                 <textblock x:name="surname" text="{binding property1}" fontfamily="arial" fontsize="16" fontweight="bold" d:layoutoverrides="width"/>                 <textblock x:name="firstname" text="{binding property2}" foreground="#ffc9c23e" fontfamily="arial" fontsize="12" d:layoutoverrides="width"/>             </stackpanel>             <button x:name="button1" content="press" />              </stackpanel>     </datatemplate> 

i don't know how fire event adding in xaml doesn't work here(presumably it's template). appreicated.

datatemplate not problem subscribe events. may if datatemplate located in separate resources file, have no rational place place event handler. if can make use of commands (i believe work in version 3 too).


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -