there are 535 perfectionists like me. a small percentage, but we exist.
for vs2015:
- Menu> Tools> Extensions and Updates
- install "Visual Commander". (Now you have a new menu called "VCmd")
- Menu> "VCmd"> Extensions ... (You will see the extension panel on the right)
- Click the Add button in the Extensions panel. (A new WIndow tab opens.)
- write a name for the extension.
- choose a language like C #.
- paste the following code:
- Click "Save." Then click Compile. Then click Install
edit: the code will not do anything in xamarin.android projects (it behaved incorrectly)
using EnvDTE; using EnvDTE80; using System.Windows.Forms; using System; public class E: VisualCommanderExt.IExtension { private EnvDTE80.DTE2 DTE; private EnvDTE.WindowEvents windowEvents; public void SetSite(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package) { this.DTE = DTE; DTE.Events.WindowEvents.WindowActivated += OnWindowActivated; } public void Close() { // DTE.Events.WindowEvents.WindowActivated -= OnWindowActivated; } private void OnWindowActivated(Window gotFocus, Window lostFocus) { //project_details(); HidePropertiesWindowInCodeOrTextView(gotFocus); } public void HidePropertiesWindowInCodeOrTextView(Window gotFocus) { //System.Windows.MessageBox.Show( gotFocus.Document.Name +"" ); if (isAndroidProject()) return; if (gotFocus.Document == null) return; var pwin = DTE.Windows.Item(Constants.vsWindowKindProperties); pwin.AutoHides = !gotFocus.Caption.EndsWith(" [Design]"); //pwin.AutoHides = true; // pwin.Activate(); } public bool isAndroidProject() { if (DTE == null || DTE.ActiveWindow == null) return false; var cp = DTE.ActiveWindow.Project; var AndroidApp = System.IO.File.ReadAllText(cp.FullName).Contains("AndroidApplication"); return AndroidApp; } }
source share