URIを取得し、アイテムをバインディングに入れることもできますが、画像には入れることができないJSONリクエストがあります。
XAML:
<Image delay:LowProfileImageLoader.UriSource="{Binding ImageUrl}" Width="120" Height="120" />
<TextBlock Text="{Binding DisplayName}" FontSize="30" TextWrapping="Wrap" TextTrimming="WordEllipsis" />
フィードを取得したら、次のように実行します。
using (var stream = new MemoryStream(Encoding.Unicode.GetBytes(e.Result)))
{
DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(ProviderChannels.RootObject));
var providerResult = (ProviderChannels.RootObject)dataContractJsonSerializer.ReadObject(stream);
if (providerResult.ServiceDetailsResult != null)
{
ProviderChannels.ItemsSource = providerResult.ServiceResult.Lineup.Channels;
}
問題は、次の ImageUrl で取得する画像を取得できないことです。
public class Channeli
{
public string DisplayName { get; set; }
public List<object> ChannelImages { get; set; }
}
feed/ChannelImages はこれを行います:
"ChannelImages": [
{
"ImageUrl": "http://the-url-generated.com/file.png",
"ImageUseType": null,
}
ChannelImages は ImageUrl と他のデータの束を報告しますが、厳密には ImageUrl が必要ですが、ImageUrl を配置すると XAML でも機能しないようですが、ChannelImages を使用して ImageUrl を取得するにはどうすればよいですか?
助けてくれてありがとう!