Copy plot to clipboard with context menu

Oct 2, 2013 at 12:17 PM
I know that it's possible to copy a plot through the ctrl-c keyboard combination, but I'd like to make it a bit more obvious by setting a Context menu that has "Copy to clipboard".

I've seen in another thread that the Plot was bound to ApplicationCommands.Copy, so I thought that this would work:
<oxy:Plot>
                <oxy:Plot.ContextMenu>
                    <ContextMenu>
                        <MenuItem Command="ApplicationCommands.Copy" Header="Copy to clipboard" />
                    </ContextMenu>
                </oxy:Plot.ContextMenu>
</oxy:Plot>
But it doesn't work, when I right-click, the context menu is displayed correctly but the "Copy to clipboard" is disabled.

Any idea?
Oct 2, 2013 at 2:19 PM
Edited Oct 2, 2013 at 2:20 PM
See https://oxyplot.codeplex.com/discussions/455532
I don't know why but Commands do not work in the ContextMenu. If you want that you should use the click event and then send a message (with Messenger or Mediator) to your ViewModel (or copy the plot in the codebehind with the click event). Good luck.