Well here's the thing.
I've been working on an IDE and now to implement the AvalonDock I must use WPF so I migrate the hole project to be compatible. But I've got a problem that I can't solve.
I got all the documents on an ObservableCollection(Of DocumentViewModel) called 'Documents', I access to this collection almost every time due the fact this is where I store user defined functions, errors, etc.
The thing is that with AvalonDock I must use a template, here's where I create 'DocumentView' with is the control that holds the Syntax Editor (ScintillaNet).
Now my question is, how to indicate the app with of the items inside 'Documents' he should use as a datacontext for each opened document?