Ciao,
Sto realizzando un applicazione che legge dei feed rss, però ho un problema sul binding dei dati, tutte le lettere accentante non vengono visualizzate correttamente...
Questo è il codice che utilizzo:
public void LoadData()
{
string url = "http://feeds.feed.it/rss";
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(url));
request.BeginGetResponse(ResponseHandler, request);
}
private void ResponseHandler(IAsyncResult asyncResult)
{
HttpWebRequest request = (HttpWebRequest)asyncResult.AsyncState;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asyncResult);
if (response.StatusCode == HttpStatusCode.OK)
{
XmlReader reader = XmlReader.Create(response.GetResponseStream());
SyndicationFeed newFeed = SyndicationFeed.Load(reader);
MainListBox.Dispatcher.BeginInvoke(delegate
{
MainListBox.ItemsSource = newFeed.Items;
});
}
}
<TextBlock
x:Name="ItemText"
Margin="12,0,0,0"
Text="{Binding Title.Text}"
Style="{StaticResource PhoneTextSubtleStyle}"
TextWrapping="Wrap"
MaxWidth="450"/>