Remove inclusion of context menu in all documents#460
Remove inclusion of context menu in all documents#460mrlacey wants to merge 6 commits intoXavalon:masterfrom
Conversation
| <IDSymbol name="GroupIDXamlStylerContextCrossProjectMultiProjectFolderGroup" value="0x105b" /> | ||
|
|
||
| <!-- This is the command set for the document tab context menu --> | ||
| <IDSymbol name="GroupIDXamlStylerContextDocumentTabGroup" value="0x1070" /> |
There was a problem hiding this comment.
Sorry, missed this comment previously.
The current (prior to this PR) version adds the "Format XAML" option to the context menu on the tab of any document window. Am I right to assume this should be filtered to just xaml files also?
There was a problem hiding this comment.
Yes, this is ideally filtered to xaml (and axaml) files.
| <Parent guid="GuidVisualStudioXAMLWindowContextMenu" id="IDVisualStudioXAMLWindowContextMenu"/> | ||
| </Group> | ||
| <Group guid="GuidXamlStylerMenuSet" id="GroupIDXamlStylerMenu" priority="0x0001"> | ||
| <Parent guid="GuidVisualStudioXamarWindowContextMenu" id="IDVisualStudioXamarinWindowContextMenu"/> |
There was a problem hiding this comment.
@NicoVermeir do you recall why we added these Xamarin-specific entries? Are they still relevant?
There was a problem hiding this comment.
Looks like they were there for AXAML support :/
There was a problem hiding this comment.
somehow I completely missed this comment, sorry about that! that entry was there because Xamarin, even though it has .xaml extension, didn't use the XAML editor window but the XML editor. XAML Styler didn't show up in the right-click menu because of that, this entry fixed that
|
Here's an update on my current investigation into resolving the issues blocking this. Everything here comes with a big AFAIK disclaimer. There is an existing context menu for when editing XAML documents. Adding to this is easy and was part of the original PR. The context menu for the document tab is separate and is the same for all document types. I can add to this and filter it so it only shows based on the "Content Type" of the active document. I can do this for XAML files.
AXAML documents use the standard code editor, but there is no specific context menu to add to that only shows for AXAML documents. I can add the "Format XAML" option to this menu but haven't been able to get it to only show based on the file extension. AXAML documents have a content type of "xml". I can't get filtering on this content type to work correctly. 😞 I will keep investigating and trying to get this all working as desired.... |

Description:
Fixes #132 (issue)
This removes unneeded and incorrect VSCT entries for the "Format XAML" context menu option.
0x040Dof the "VS Main Menu") - I can't find a definitionI assume the "Xamarin" entry was added for a special case (in an earlier version of VS) that no longer applies.
Checklist: