c# - How to get text inside LongListSelector by clicking a button -


i have longlistselector , datatemplate this: grid has in left textblock , in right button. when press button want text inside textblock near button. idea row index of button , index access specified textblock, don't know how this. if know how can write code or if has better idea i'm open solutions.

this xaml:

<phone:longlistselector x:name="categorieslist"                         margin="0,0,-12,0"                          itemssource="{binding categories.items}">     <phone:longlistselector.itemtemplate>         <datatemplate>             <grid margin="-2,0,2,17">                 <grid.columndefinitions>                     <columndefinition width="*" />                     <columndefinition width="auto" />                 </grid.columndefinitions>                 <textblock x:name="categorytextblock"                            verticalalignment="center"                            text="{binding name}"                            tap="categoryname_tap"                            style="{staticresourcephonetextextralargestyle}">                 </textblock>                 <button x:name="categorybutton"                         content="get text"                         height="100"                         width="100"                         horizontalalignment="left"                         grid.column="1"                         click="photobutton_click">                 </button>             </grid>         </datatemplate>     </phone:longlistselector.itemtemplate> </phone:longlistselector> 


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -