views:

24

answers:

1

Hi All,

The listbox contain images and the object assigned to the listbox have corresponding wmv file path. How to bind the selected path the the mediaelement through {binding}.

Geetha.

A: 

You can use ElementName to set the binding source to the list box, and then bind to a property of SelectedItem:

<ListBox Name="imageListBox" ... />
<MediaElement Source="{Binding ElementName=imageListBox, Path=SelectedItem.WmvPath}"/>
Quartermeister
Thank You. It is working.
Geetha