tags:

views:

21

answers:

1

Is there a way to bind a property of the listboxitem to one of it's owning listbox? I want it in a template so I believe that rules out ElementName.

+2  A: 

Use the FindAncestor mode of the Binding class. Like this:

{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}, Path=YourProperty}

Charlie