Hi Adam,
Thanks for pointing that I was in wrong place!
When I searched for this error "Failed to load menus!", I only got some match in this thread.
I assumed if nobody reported this error before that may not mean they didn't encounter it.
Anyway, I figured out what was the problem.
It was in the code I posted earlier.
In SetPlainMode() in code-behind, I had this code
textArea.AotoConfigure = AutoConfigure.None
textArea.ContextMenuMode = string.Empty
I realised it should be "None".
Changing the value has fixed the problem.
cheers