views:

63

answers:

1

Hi!

I have a Contact entity that exposes a navigation proeprty for child Phone entities.

Public Class Contact : Inherits EntityObject    
    Public Property Phones() As EntityCollection(Of Phone)
EndClass

I want to Xamly retrieve the first phone of the bound contact. I tried the following but it doesn't work. Note: I also tried Phones[0] (I use VB).

<DataTemplate DataType="{x:Type data:Contact}">
    <TextBlock Text="{Binding Phones(0)}"/>
</DataTemplate>

Any suggestions (either in VB or C# will be welcommed)?

A: 

In this link I found interesting solutions.

I am still opened to hear about new 'Xamly' ideas, that doesn't have to involve converters etc.

TheJeffro's one looks the best, and this is what I am using till further posts.

Shimmy