c# - How to display a set of images in windows phone 8,8.1 -


how can display set of scrollable images have in bitmap format or in list< bitmapimage > , allow user select 1 of them.

i have bitmapimage in list, here code snippet

page.xaml

 <phone:longlistselector x:name="imagelist" scrollviewer.horizontalscrollbarvisibility="auto">                  <phone:longlistselector.itemtemplate>                     <datatemplate>                         <image source="{binding bitmapimage}"/>                     </datatemplate>                 </phone:longlistselector.itemtemplate>             </phone:longlistselector> 

page.cs code -

displayimageslist = phoneapplicationservice.current.state["pro_images"] list<bitmapimage>;         imagelist.itemssource = displayimageslist; 

i adding answer other got helped :)

your list list of bitmapimage class have use directly binding. in case trying bind property if bitmapimage type not present anywhere image control not able find source.

<phone:longlistselector x:name="imagelist" scrollviewer.horizontalscrollbarvisibility="auto">          <phone:longlistselector.itemtemplate>             <datatemplate>                 <image source="{binding}"/>             </datatemplate>         </phone:longlistselector.itemtemplate>     </phone:longlistselector> 

Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -