209

When I debug my application in Microsoft Visual Studio 2015 Update 2, and I open a custom wpf dialog I get some extra debugging options in a black square. See image blow.

enter image description here

How do I disable that?

This first icon says "Go To Live Visual Tree". The second icon says "Enable Selection". The third icon says "Display Layout Adorners".

0

5 Answers 5

270

Try unchecking this option: Tools –> Options –> Debugging –> General –> Enable UI Debugging Tools for XAML.

Though you still might consider leaving it on and using it to your advantage.

6
  • 12
    I think it is enabled by default. This feature was introduced in VS2015 Update 2. Commented Apr 14, 2016 at 10:49
  • 14
    It is enabled in the update. Unfortunately it also obscures the screen which is why it is awesome to know how to remove it Commented Apr 21, 2016 at 16:51
  • I had the opposite problem--everything was checked, but the tools would only appear rarely. The pattern seems to be that they are only displayed if you run without building first.
    – dlf
    Commented Apr 22, 2016 at 20:03
  • 23
    Seriously you have to wonder about people who make UI design choices like this. It should not be enabled by default, and it should have a 'disable' option on it... and not make you go hunting on SO. Commented Dec 2, 2016 at 15:36
  • 1
    It has been moved to Tools > Options > Debugging > Hot Reload > Enable in-app toolbar. See my answer below.
    – metatron
    Commented Nov 16, 2021 at 9:12
132

After having the same question and finding the answer here, I also discovered that it can be toggled from the Live Visual Tree window.

While debugging, Debug (menu) -> Windows -> Live Visual Tree

The first icon (Show runtime tools in application) will toggle it.

Show runtime tools in application

3
  • 4
    Indeed. The Live Visual Tree is a toolbar collapsed on the left side of the visual studio.
    – Eternal21
    Commented Apr 26, 2016 at 17:55
  • 3
    Great answer! This black box hides something important and this is the best way to collapse it not turning off the whole feature. Commented Nov 18, 2016 at 17:42
  • 4
    This is definitely the best solution. This way I can take screen shots at design time without having to mess with other settings.
    – DoomVroom
    Commented Oct 27, 2017 at 19:33
22

Instead of turning mine off entirely, I've taken to collapsing it most of the time. There are still times when it's entirely useful, and the collapsed version does a nice job of providing only minimal UI usage. To collapse it, click on the horizontal bar:

enter image description here

To restore it, simply click the bar again.

3
  • 4
    It would have been nice if they also allowed us to slide it along the top by dragging that collapse button. Sometimes it's still in the way after collapsing. Commented Aug 23, 2016 at 1:33
  • 1
    @BrianReichle if it's still in the way, then review your UIs: not leaving that tiny bit of space between the internal border of the window and the content is really bad UI design.
    – motoDrizzt
    Commented Jun 11, 2017 at 6:58
  • 8
    @motoDrizzt No it's not, it's effective use of screen real estate. Sometimes that's more important than a "beautiful" sparse GUI. Not allowing the tool to be repositioned/hidden as needed is bad UI-design..
    – Niclas
    Commented Jun 19, 2018 at 12:11
22

It has been moved to

Tools > Options > Debugging > XAML Hot Reload > Enable in-app toolbar

2
  • Thanks, a l o t
    – mohaa8844
    Commented Sep 29, 2021 at 6:39
  • 1
    Also in: Microsoft Visual Studio Community 2022 (64-bit) Version 17.0.1
    – Davor
    Commented Nov 16, 2021 at 22:32
17

I realise that this is an old question, but there is an additional option that no one has mentioned. Rather than turning this useful functionality off completely, we can enable the functionality, but just remove the annoying runtime tools from appearing at the top of our applications:

enter image description here

This option can be unchecked at the following location:

Tools > Options > Debugging > General > Enable UI Debugging Tools for XAML > Show runtime tools in the application

Not the answer you're looking for? Browse other questions tagged or ask your own question.