-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to set the position of the menu item in the context menu? #313
Comments
Hey @aybe, good question, sadly yet there is no clear way to do this.
Also, reading a bit more at MS docs, these resources could help you do it.
If you can, try to overwrite/change the implementation to use the index and set the index where you want it to be. Never tryed yet. Maybe you want to try it and make a PR implementing that feature if working, would help tons ❤️. |
There you go: Needs more testing but so far works as expected! |
Great 👍 will look into it more tomorrow as it's almost midnight here :D Question: How do you specify "uint itemIndex" now? Or is the one from the system okay for you? |
To me, the value Not sure I understand what you mean, I did nothing more than implementing a context menu, nothing at all in registry (it just works out of the box). I did a quick test, copy pasted a context menu many times, looks like it's working fine: I think it's just best to leave it as it is, it addresses most cases if not all, so why bother ? :) |
Hey @aybe thanks for clearing that in your PR. |
OK
Le 5 nov. 2019 19:47, Pascal Ried <[email protected]> a écrit :
Hey @aybe<https://github.com/aybe> thanks for clearing that in your PR.
I want to keep this open to add it (how to position items) to the docs with a reference to your comment (314)<#314 (comment)>, why specifying the index manually is usually a bad idea. I will close it, after checking the docs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#313?email_source=notifications&email_token=AALXMNZCVD4ZUQLYBDSITNDQSG5TBA5CNFSM4JIXQDA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDD4QEY#issuecomment-549963795>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AALXMN3YDVDSSQN3IKDLAXTQSG5TBANCNFSM4JIXQDAQ>.
|
Have you tried in windows 11? . I am struggling to set option in window 11. It is showing context menu but I need to click on show more options. |
Version of SharpShell used: 2.7.1
Related type(s) of SharpShell-Server: Directory, DirectoryBackground
As you can see below, the menu item sits at the very top of the context menu, which while nice, breaks a bit UX. Ideally, I would like it to sit below
View, Sort by, Group by, Refresh, Customize this folder..., Paste
, i.e. where all non-system menu items are.Here's current code:
Is this possible somehow?
Thank you.
The text was updated successfully, but these errors were encountered: