This project is read-only.

Getting Binding Data from ElementFlow

Feb 6, 2010 at 11:40 PM

Hi Guys,

I am trying to make a simple movie library with a Coverflow style interface. I am having an issue getting data from the selected item in ElementFlow.
I started by connected to a SQL Database using Linq and used the below script to display the data in the Listbox.

LinqDataClassDataContext dc = new LinqDataClassDataContext();

var query = from s in dc.movie_LIBRARies
select s;
movieListBox.ItemsSource = query.ToList();

There are two fields in the database at the moment, one is the Movie Name (movie_NAME) and the other is a URL to the Artwork (movie_ARTWORK).

I used a DataTemplate to display the Artwork in the Listbox. Below the Listbox is a Label that displays the Movie Name of the selected item in the ListBox.

<DataTemplate x:Key="TestDataTemplate"/>

<Image Source="{Binding movie_ARTWORK}"/>

<Label Content="{Binding ElementName=movieListBox, Path=SelectedItem.movie_NAME}" />

When using the ListBox, it works perfectly. The Artwork is displayed in the ListBox and the Name of the SelectedItem is display by the label.

When i substitute the Listbox for ElementFlow, the Artwork is displayed in ElementFlow but the Name of the SelectedItem is not displayed in the Label (It remains blank).

Does anyone know what could cause this issue? Am I even doing the right thing???
Thanks in advance for your help,