Xavalon / XamlStyler

Visual Studio extension to help format your XAML source code
Apache License 2.0
1.21k stars 133 forks source link

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

Open ravindUwU opened 7 years ago

ravindUwU commented 7 years ago

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?

grochocki commented 6 years ago

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

ravindUwU commented 6 years ago

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.

wilsade commented 6 years ago

Hi there,

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

Thanks.

grochocki commented 4 years ago

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

mrlacey commented 11 months ago

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.

grochocki commented 11 months ago

Yes! Still open to a contribution to fix this.