I have a usercontrol I have created. It is used within the DataTemplate of a list box. The listbox is bound to an observable collection of custom objects.
I need a way to pass the current object to my usercontrol via binding.
I have tried to create a public property on the user control as such:
public TypedMediaItem CurrentItem { get; set; }
And set the binding parameters:
<my:LargeStreamItemControl Height="160" Width="295" CurrentItem="{Binding }" />
However this gives me the following error:
Object of type 'System.Windows.Data.Binding' cannot be converted to type 'F1MediaCentre.Classes.Payload.Typed.TypedMediaItem'.
I am unsure where I am going wrong - I am new to Silverlight, having inherited a live production application from a former colleague, and am racking my brains with this one.