Reputation: 2041
I have a Linq query below with 'product' containing sub-elements 'Name' and 'Price' in an XML file.
var queryAllProducts = from product in products
select new {
Product = product
, PriceEuro = UsdToEuro(product.PriceUsd)
};
In my xaml file, I can bind a Textblock to PriceEuro with
<TextBlock Text= "{Binding PriceEuro}" />
How do I bind a TextBlock to 'Name'? Text = "{Binding Product.Name}"
didn't work for me.
Thanks.
Upvotes: 0
Views: 61