I've made a Control in XAML and added it to the adornment layer, in the control I have a section that should spawn a context menu when right clicked (using TextBox.ContextMenu property). I've tested it in a regular WPF Window and it works great. However, when I tried the same in Visual Studio on an adornment layer I only got the VS2010 editor context menu.
I also tried now to use a regular MouseRightButtonUp event, which does seem to work (the event arrives to the function). However, as soon the event function exits, the Editor context menu jumps up.
- How can I make the regular context menu to work?
- If there is no way, how can I prevent the editor context menu from jumping after MouseRightButtonUp function?
- (Follow up to #2) How do I invoke the context menu manually from MouseRightButtonUp?
Thank you, Vitaly