Luiscencio
Luiscencio

Reputation: 3965

Is there a Keyboard Shortcut to HIDE properties pane?

Is there a Keyboard Shortcut to HIDE properties pane?

Upvotes: 1

Views: 468

Answers (4)

Taudris
Taudris

Reputation: 1443

I encountered an issue where VS2008 wouldn't display anything in the Properties window in the WPF designer if it was set to autohide. In my searching for a solution, I found this question. As noted in the question, F4 normally only shows/focuses the Properties window. I followed the steps in Marcel's answer and modified the resulting macro as shown below to allow F4 to instead toggle the Properties window:

Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module RecordingModule
    Sub TogglePropertiesTab()
        If DTE.Windows.Item(Constants.vsWindowKindProperties).Visible Then
            DTE.Windows.Item(Constants.vsWindowKindProperties).Close()
        Else
            DTE.Windows.Item(Constants.vsWindowKindProperties).Activate()
        End If
    End Sub
End Module

Upvotes: 2

Shawn Steward
Shawn Steward

Reputation: 6825

No, I've never seen anything to actually hide the properties pane. Best you can do is set it to Auto Hide (click the Pin icon) and then use F4 to open it up when you want it. Then it will Auto Hide when you're done.

EDIT: Looks like you can create a macro for it as noted by the other Answers. Nice!

Upvotes: 1

Marcel Jackwerth
Marcel Jackwerth

Reputation: 54762

Detailed instructions for how to build a macro:

  1. Bring up the Properties window
  2. Ctrl+Shift+R to start Macro recording
  3. Close the Properties Window
  4. Ctrl+Shift+R to stop recording.
  5. Alt+F8 to open the Macro Browser.
  6. RecordingModule > TemporaryMacro contains your macro. Rename "RecordingModule" to something different. Should look like this:

Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module RecordingModule
    Sub TemporaryMacro()
        DTE.Windows.Item(Constants.vsWindowKindProperties).Close()
    End Sub
End Module

  1. Tools > Customize and there Keyboard
  2. Search for (depending on how you renamed it) Macros.MyMacros.RecordingModule1.TemporaryMacro and choose your shortcut.

Upvotes: 4

Kane
Kane

Reputation: 16802

If there's not you could always create a macro to close the properties window and bind the macro to a keyboard shortcut.

Upvotes: 2

Related Questions