c# - Databinding to a ListView inside a HubSection -
I am getting search results from the Bing API and each article is added to the list and no results appear in XHTML but HubSection is.
private list & lt; NewsAds & gt; BNews = New List & amp; Lt; NewsAds & gt; ();
Where the news article is defined:
public class news article: INotifyPropertyChanged {Private string description; Public Event Threaded ChangedEventHandler Property changed; Public string description 1 {get {return details; } Set {description = value; }} Private string links; Public string link 1 {get {return link; } Set {link = value; }} Private string title; Public String Title 1 {Get {Return Title; } Set {title = value; NotifyProperyChanged ("title"); }} Public Zero NotifyProperyChanged (string propertyName) {If (PropertyChanged! = Tap) {PropertyChanged (New, PropertyChangedEventArgs (propertyName)); }}
And here XAML is showing my HubSection and My bindings.
& lt; HubSection DataContext = "{Binding BNs}" name = "newsb" header = "Hello world" & gt; & Lt; DataTemplate & gt; & Lt; ListView ItemsSource = "{Binding}" margin = "10" name = "listbox rss" & gt; & Lt; ListView.ItemTemplate & gt; & Lt; DataTemplate & gt; & Lt; StackPanel & gt; & Lt; Text block text = "{binding title 1}" tag = "{binding link 1}" textwapping = "wrap" /> & Lt; / StackPanel & gt; & Lt; / DataTemplate & gt; & Lt; /ListView.ItemTemplate> & Lt; / ListView & gt; & Lt; / DataTemplate & gt; & Lt; / HubSection & gt;
I have looked around for other examples and even was able to work it properly in the Panorama style app, but it worked well inside HubSection having trouble. Any insights will be amazing.
Comments
Post a Comment