WreckedAvent/slimCat — pull request #227 by Tyroie (2014-11-20 09:52:56+00:00)
Title: Right click menus always stay open

I'm really proud of this one, but it's also scary. I'm not sure what possible problems this might cause, and I'd understand if it's rejected. I really hope it works, though.

I dove back into this problem when a couple days ago, somebody in the slimCat channel mentioned that their right-click menus function just like mine - that they appear when the button is pressed, not released, and that it was frustratingly hard to keep the menu open. From what I'm read online, the `Mousebinding` is actually supposed to use MouseDown like that - and it seems strange to me that it would differ. It bugs me.

What I tried to do here was use the event `MouseRightButtonUp`, and have the code behind execute the same command as similarly as possible to what I see the original Xaml code doing. In that way, I hope it's not so nasty. It grabs `dataContext`s from the same (or similar) objects, gets the same `relayCommand`, then executes it. All of that work is done in ExtensionMethods.cs.

I've only spent the last half hour clicking around and testing this, and it seems fine so far, but I'm going to see how this works in the following days.