I have an ItemsControl defined as shown below. Basically, I have a list of editors (EditorList) and I want hyperlinks for each. However, my open command (OpenEditorCommand) property is at the same level as the list of editors. How do I refer to that property when the context is set to the item within the list. I've tried working with the RelativeSource method but it's too convoluted for me to understand. Am I on the right track?
<ItemsControl ItemsSource="{Binding EditorList}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Margin="2,6" HorizontalAlignment="Center">
<Hyperlink Command="{Binding RelativeSource={RelativeSource AncestorType=ItemsControl, AncestorLevel=2, Mode=FindAncestor}, Path=OpenEditorCommand}" CommandParameter="{Binding Name}">
<StackPanel>
<Image Source="{Binding Image}" Width=32/>
<TextBlock Text="{Binding Path=Name}"/>
</StackPanel>
</Hyperlink>
</TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>