Click here to Skip to main content
15,885,869 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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?
Posted
Comments
Sergey Alexandrovich Kryukov 3-Apr-13 18:48pm    
Not clear. What is "to indicate"?..
—SA
The_Chaoz 7-Apr-13 20:14pm    
Hmmm how to explain this in a better way?

Let's say I've a collection with all my documents, this is ussed by AvalonDock to create/destroy new 'tabs' on the screen. Beside this collection, each of this 'tabs' edit his own datacontext.
Both the collection and each of the datacontext's have the same type, but I need to bind the datacontext of each 'tab' with 'the right one' in the collection, so I can access the info I proccess and store there from other modules of the app.

Hope it's more clear now.

1 solution

Using Scintilla in WPF sounds quite questionable to me. Why not using AvalonEdit instead? Please see this CodeProject article:
Using AvalonEdit (WPF Text Editor)[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900