c# - WP8 - Bind AlphaKeyGroup ObservableCollection to LongListSelector Itemsource -


i still haven't found problem in code. maybe, might not possible bind alphakeygroep observable collection?

i'am writing wp8 application uses longlistselector jumplist. binding works when using longlistselector without use of jumplist. trafficfeed implements inotifypropertychanged. binding in xaml follows:

itemssource="{binding feedsa}"

private observablecollection<trafficfeed> feedsa = new observablecollection<trafficfeed>();   public observablecollection<trafficfeed> feedsa {     { return feedsa; }     set { feedsa = value; } } 

when adding jumplist, need change observable collection to:

private observablecollection<alphakeygroup<trafficfeed>> datasourceantwerpen = new observablecollection<alphakeygroup<trafficfeed>>();  public observablecollection<alphakeygroup<trafficfeed>> datasourceantwerpen {     { return datasourceantwerpen; }     set { datasourceantwerpen = value; } }  <phone:pivotitem header="item2">     <phone:longlistselector selectionchanged="feedlistbox_selectionchanged"         itemssource="{binding datasourceantwerpen}"         x:name="longlistfeedsa"         jumpliststyle="{staticresource addrbookjumpliststyle}"         background="transparent"         groupheadertemplate="{staticresource addrbookgroupheadertemplate}"         itemtemplate="{staticresource addrbookitemtemplate}"         layoutmode="list"         isgroupingenabled="true"         hideemptygroups ="true"/>  <phone:phoneapplicationpage.resources>     <datatemplate x:key="addrbookitemtemplate">         <stackpanel verticalalignment="top">             <textblock textdecorations="underline" fontsize="24" name="feedtitle" textwrapping="wrap" margin="12,0,0,0" horizontalalignment="left" foreground="{staticresource phoneaccentbrush}" text="{binding title}" />             <textblock name="feedsummary" textwrapping="wrap" margin="12,0,0,0" text="{binding description}" />             <textblock name="feedpubdate" foreground="{staticresource phonesubtlebrush}" margin="12,0,0,10" text="{binding pubdate}" />         </stackpanel>     </datatemplate>     <datatemplate x:key="addrbookgroupheadertemplate">         <border background="transparent" padding="5">             <border background="{staticresource phoneaccentbrush}" borderbrush="{staticresource phoneaccentbrush}" borderthickness="2" width="auto"       height="62" margin="0,0,18,0" horizontalalignment="left">                 <textblock text="{binding key}" foreground="{staticresource phoneforegroundbrush}" fontsize="48" padding="6"          fontfamily="{staticresource phonefontfamilysemilight}" horizontalalignment="left" verticalalignment="center"/>             </border>         </border>     </datatemplate>     <phone:jumplistitembackgroundconverter x:key="backgroundconverter"/>     <phone:jumplistitemforegroundconverter x:key="foregroundconverter"/>     <style x:key="addrbookjumpliststyle" targettype="phone:longlistselector">         <setter property="gridcellsize"  value="200,100"/>         <setter property="layoutmode" value="grid" />         <setter property="itemtemplate">             <setter.value>                 <datatemplate>                     <border background="{binding converter={staticresource backgroundconverter}}" width="200" height="100" margin="6" >                         <textblock text="{binding key}" fontfamily="{staticresource phonefontfamilysemibold}" fontsize="48" padding="6"             foreground="{binding converter={staticresource foregroundconverter}}" verticalalignment="center"/>                     </border>                 </datatemplate>             </setter.value>         </setter>     </style> </phone:phoneapplicationpage.resources> 

now binding doesn't work anymore. should add?


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -