So I have a custom WPF UserControl called Row. It has a DependencyProperty called Index. The DataContext of Row is a class called ViewModel which contains an ObservableCollection. Within the XAML of Row, if possible, I want to bind the text in a TextBox with whatever element is at Index inside said collection. So, something like this:
<TextBox Text="{Binding Elements[{Binding Index}]}" />
How can I access Index, which is in Row's codebehind, in Row's xaml if the DataContext of Row is something else?
I hope that I explained this clearly, thanks in advance for whatever help is provided.