
Hi,
I want to create new tab dynamically in my viewModel with my own contextMenu for header. For this I create textBlock with mouseRightButtonDown event, and add it to documentWindow's header, then I add documentWindow to tabbedMdiContainer and bind it to my view.
Here is my XAMl :
and code in viewModel:
The problem is that the size of a textBlock doesn't fit headers size, so I have two contextMenus - one when I click on a header and another when I click on a textBlock.
How can I solve this problem?
Thnx in advance.