Skip to content
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

Copy key/value/names ContextMenu for resource tables #3024

Merged
merged 2 commits into from
Jul 2, 2023

Conversation

miloush
Copy link
Contributor

@miloush miloush commented Jun 24, 2023

Fixes #3023

Problem

The resource tables show document context menu that does not allow copying items.

Solution

This PR adds a context menu with a few copy options.

It also fixes the issue that the normal copy uses simple ToString() which

  • for object table is not overloaded and just copies the internal ILSpy type name
  • for string table it used [Key, Value] syntax

Now it separates the columns by tabs so that they can be pasted into Excel etc.

Before:
image

After:
image

@siegfriedpammer
Copy link
Member

Small nit: having the same shortcut for three different menu commands seems a bit strange to me.

@christophwille
Copy link
Member

Yes, only one Copy item should have the Ctrl+C shortcut.

@miloush
Copy link
Contributor Author

miloush commented Jun 24, 2023 via email

@siegfriedpammer
Copy link
Member

Unless you are happy with something like InputGestureText=” “ that might work…?

That is the solution I was going to suggest. No need to over-complicate things :)

@miloush
Copy link
Contributor Author

miloush commented Jun 25, 2023

That did the trick indeed. I wonder whether we should fix this on WPF side...

@siegfriedpammer siegfriedpammer merged commit e70c4ba into icsharpcode:master Jul 2, 2023
5 checks passed
@siegfriedpammer
Copy link
Member

Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource tables do not have their context menus
3 participants