wpf - Replace RichTextBox's ContextMenu -
Using .NET 4 and VS2010 Pro, I have created a very simple WPF application, in which the main XW contains the following XAML:
& lt; Grid & gt; & Lt; RichTextBox x: name = "rich textbox" margin = "2" /> & Lt; / Grid & gt;
All I want to do, and have failed to do so by now, the context menu for the richxbox is to take my own place. I've tried code-behind without any luck:
The harm I am doing is not doing properly. Is its mouse mode being caught by event RTB? Do I have to get my own version of RTB and open the context menu to work it out? It really looks like something, but I'm not seeing it.
Thanks in advance. Rich Textbox X: "Rich Textbox" margin = "2" & gt; ">
& lt; RichTextBox.ContextMenu> & lt; ContextMenu / & gt; & lt; /RichTextBox.ContextMenu> & lt; / RichTextBox & gt;
Rich There is a logic for supplying the contextual menu with things like the base class of the textbox, the logic and the paste in the textboxbox. This logic handles handled as ContextMenuOpening, so your handler has not been implemented. Scope The RichTextBox even empty Info menu, it will leave alone your context menu and open your handler.
Comments
Post a Comment