the description of jsTree contextmenu says "The contextmenu plugin enables a contextual menu to be shown, when the user right-clicks a node (or when triggered programatically by the developer)."
could somebody tell me how
Left-click brings up Context Menu Open Windows 10 Device Settings and click on Mouse and Touchpad . Scroll down a bit and click on Additional Mouse Options .
Although it is possible, it would be against standard windows expectations to display a context menu on left click. Regarding making this MVVM, I believe the XAML would be in your "view", the Image_MouseDown C# code would be in your "view model", and your "model" should not know anything about the context menu. Here is a XAML only solution.
This tutorial shows you 2 simple ways to make Windows 10 display right-click context menu on the right side instead of the left side. Press the Windows key + R to open the Run box. Type the following command and press Enter.
If you want Windows to show context menu to the left side, just set MenuDropAlignment back to 1. After you edit the value, you need to sign out and sign in back to your Windows account or restart your computer. Windows should place the context menu on the right side.
Since JSTree 3
$('#jstree_list').jstree({
...
}).on('select_node.jstree', function (e, data) {
setTimeout(function() {
data.instance.show_contextmenu(data.node)
}, 100);
});
The delay seems necessary, I don't know exactly why
You can trigger context menu on elem
(eg. a <li>) by $(elem).trigger('contextmenu.jstree')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With