c# - Databinding to a ListView inside a HubSection -
c# - Databinding to a ListView inside a HubSection -
i'm getting search results bing api , adding each article list , trying bind listview in xaml no results appear in hubsection.
class="lang-c# prettyprint-override">private list<newsarticle> bnews = new list<newsarticle>();
where newsarticle defined as:
public class newsarticle : inotifypropertychanged { private string description; public event propertychangedeventhandler propertychanged; public string description1 { { homecoming description; } set { description = value; } } private string link; public string link1 { { homecoming link; } set { link = value; } } private string title; public string title1 { { homecoming title; } set { title = value; notifyproperychanged("title"); } } public void notifyproperychanged(string propertyname) { if (propertychanged != null) { propertychanged(this, new propertychangedeventargs(propertyname)); } }
and here xaml showing hubsection , bindings.
class="lang-xaml prettyprint-override"><hubsection datacontext="{binding bnews}" name="newshub" header="hello world"> <datatemplate> <listview itemssource="{binding}" margin="10" name="listboxrss"> <listview.itemtemplate> <datatemplate> <stackpanel> <textblock text="{binding title1}" tag="{binding link1}" textwrapping="wrap" /> </stackpanel> </datatemplate> </listview.itemtemplate> </listview> </datatemplate> </hubsection>
i've looked around other examples , able work in panorama style app having problem getting work within hubsection. insight wonderful.
c# xaml listview data-binding windows-phone-8.1
Comments
Post a Comment