我需要一些关于我的WP8 App的帮助。我想将linq查询的结果数据绑定到列表框或长列表
错误消息
System.Windows.Data错误:40:BindingExpression路径错误:'object'''StartOptionsViewModel'(HashCode = 7730701)'上找不到'DisplayName'属性。 BindingExpression:路径= DisplayName的; DataItem ='StartOptionsViewModel'(HashCode = 7730701); target元素是'TextBlock'(Name =''); target属性是'Text'(类型'String')
这是我的代码
public async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
var query = from Item in ParseObject.GetQuery("Item")
orderby Item.CreatedAt descending
select Item;
IEnumerable<ParseObject> results = await query.FindAsync();
foreach (var Item in results)
{
ItemName = Item["itemName"] as string;
Debug.WriteLine(ItemName);
}
}
public string ItemName { get; set; }
我希望你能帮助我
...谢谢