c# - How to get Text in GridView when selected? -
i'm working on project in i'm setting content using json binding in grid view want text of item when selected. xaml code:
<gridview itemssource="{binding}" horizontalalignment="center" margin="0,10,0,0" x:name="datalist" verticalalignment="center" selectionmode="none" selectionchanged="datalist_selection"> <gridview.itemtemplate> <datatemplate> <stackpanel width="450" height="300"> <image source="{binding top}" margin="0,0,0,0" stretch="none" /> <textblock x:name="title" text="{binding title}" foreground="black" horizontalalignment="center" fontfamily="assets/font/mixbrush.ttf#mixbrush" fontweight="bold" fontsize="50" margin="0,10,0,0" /> <image source="{binding bottom}" margin="0,0,0,0" stretch="none" /> <textblock text="{binding first}" foreground="black" horizontalalignment="center" fontfamily="assets/font/comfortaa_regular.ttf#comfortaa" fontsize="20" margin="0,50,0,0" /> <textblock text="{binding second}" foreground="black" horizontalalignment="center" fontfamily="assets/font/comfortaa_regular.ttf#comfortaa" fontsize="20" margin="0,0,0,0" /> <textblock text="{binding third}" foreground="black" horizontalalignment="center" fontfamily="assets/font/comfortaa_regular.ttf#comfortaa" fontsize="20" margin="0,0,0,0" /> </stackpanel> </datatemplate> </gridview.itemtemplate> </gridview>
here want text of "title" programmatically. please share knowledge me. :-)
********************** thank ************************
on code use:
title.text;
Comments
Post a Comment