XamlStyler icon indicating copy to clipboard operation
XamlStyler copied to clipboard

Hide the "Format XAML" option outside of the XAML editor

Open ravindUwU opened this issue 6 years ago • 6 comments

The "Format XAML" context menu option, which appears upon right-clicking the code editor, does so irrespective of the language of the document being edited (which makes it available (but useless) when languages other than XAML are edited).

While it should appear in the XAML editor,

XAML editor context menu

...it shouldn't when other languages are being edited,

C# editor context menu

Is it possible to conditionally add the option to the context menu?

ravindUwU avatar Nov 30 '17 19:11 ravindUwU

Not 100% sure if this is possible, but definitely worth exploring.

grochocki avatar Feb 03 '18 21:02 grochocki

Alternatively, a setting (that would be inactive by default), to (unconditionally) hide the "Format XAML" context menu option, would be nice.

This is because same command can be invoked automatically upon saving a XAML file, or via a keyboard shortcut which IIRC is assigned by default.

ravindUwU avatar Feb 04 '18 03:02 ravindUwU

Hi there,

Is this feature already available? The submenu stills apears on other documents.

Thanks.

wilsade avatar May 20 '18 13:05 wilsade

This would be a great improvement, assuming it is technically feasible given the current Visual Studio SDK.

grochocki avatar Apr 20 '20 04:04 grochocki

In that this has had no progress in over 5 years and even though the "help wanted" label was removed, I'm assuming that you are still open to a contribution to fix this. I find it very annoying/disappointing that the context menu shows up in the context menu of all code editor window, regardless of the file type.

mrlacey avatar Dec 24 '23 22:12 mrlacey

Yes! Still open to a contribution to fix this.

grochocki avatar Dec 28 '23 06:12 grochocki