I have two views:
- ShellView - DataContext: ShellViewModel
- VolumeViewerView - DataContext: VolumeViewerViewModel
ShellView is the root in my program and it contains 3 VolumeViewerView objects (using their ViewModel instances).
Within each context, things run pretty smooth and as expected.
However, in the VolumeViewerView, I have an <Image> whose Cursor I'd like to control from the ShellViewModel.
Here is the code:
ShellView.xaml - MainView is an instance of VolumeViewerViewModel
<Frame  Grid.Row="1" Grid.Column="0" Grid.RowSpan="3" Content="{Binding MainView}"/>
ShellViewModel.cs
private Cursor _editorCursor;
public Cursor EditorCursor
{
    get { return _editorCursor; }
    set
    {
        _editorCursor = value;
        NotifyOfPropertyChange(() => EditorCursor);
    }
}
VolumeViewerView.xaml
<Image [OTHER PROPERTIES] 
    Cursor="{Binding Path=DataContext.EditorCursor, 
                     RelativeSource={RelativeSource Mode=FindAncestor, 
                                     AncestorType={x:Type local:ShellView}}}"/>
When I bind the Cursor to a property in VolumeViewerViewModel things work well as expected. But here it isn't connecting.
I've looked for answers here, here, and here. But none of them is working.
I wonder, is this even possible given they are in different files? Does FindAncestor only work within the context of the same xaml file?
If it isn't possible, what is a good alternative? I can create EditorCursor inside VolumeViewerViewModel and have it set every time the EditorCursor in ShellViewModel is set, but that looks a bit ugly. If it is the only way, I may just elect to go there. But I would really love suggestions!
