micheal barrons
micheal barrons

Reputation: 73

How to get item[0] from "listview.ItemsSource" on universal(wpf)

lstvideo.ItemsSource = await GetVideo(_link.Link, "");    
var t = lstvideo.ItemsSource as Model.Video;

How to get t[0]?

Upvotes: 0

Views: 819

Answers (2)

zhangyiying
zhangyiying

Reputation: 424

Model.Video video = lstvideo.ItemsSource.First();

Upvotes: 0

israel altar
israel altar

Reputation: 1794

Try this (if i got you right):

    var x = t.First();

Upvotes: 1

Related Questions