In ContentPane, when I mouse right button click I can see the context menu.
But I want to display the context menu when I click a button in the content pane tab header.
Is there a way?
There is no public method for showing the default context menu of a ContentPane. The context menu is shown from 3 sources - right click/shift-f10/apps key the ContentPane or PaneTabItem, right click on the caption area of a floating window that contains only 1 content pane, and use the Window Position menu item in the pane's header. Perhaps you can create your own ContextMenu or MenuItem and add MenuItem's that use the various ContentPaneCommands (e.g. Close, ChangeToDocument, etc.). To get the same look for the menuitems you can set the Style of those menu items to a dynamic resource pointing to the XamDockManager's MenuItemStyleKey.