From 73affb7688d3e44b192cc8a05859c5a6b0b9fc03 Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Thu, 13 May 2021 14:54:48 +1000 Subject: [PATCH] Increase debug experience --- .../Windows/Forms/Design/Behavior/ContainerSelectorGlyph.cs | 2 ++ .../Design/Behavior/{BodyGlyph.cs => ControlBodyGlyph.cs} | 4 +++- .../System/Windows/Forms/Design/Behavior/GrabHandleGlyph.cs | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) rename src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/{BodyGlyph.cs => ControlBodyGlyph.cs} (91%) diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ContainerSelectorGlyph.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ContainerSelectorGlyph.cs index 7f5820f509a..4ff831c2eb5 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ContainerSelectorGlyph.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ContainerSelectorGlyph.cs @@ -4,6 +4,7 @@ #nullable enable +using System.Diagnostics; using System.Drawing; namespace System.Windows.Forms.Design.Behavior @@ -11,6 +12,7 @@ namespace System.Windows.Forms.Design.Behavior /// /// This is the glyph used to drag container controls around the designer. This glyph (and associated behavior) is created by the ParentControlDesigner. /// + [DebuggerDisplay("{GetType().Name}:: Component: {_component}, Cursor: {_hitTestCursor}")] internal sealed class ContainerSelectorGlyph : Glyph { private Rectangle _glyphBounds; diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/BodyGlyph.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ControlBodyGlyph.cs similarity index 91% rename from src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/BodyGlyph.cs rename to src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ControlBodyGlyph.cs index 3992a741251..743b1d00558 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/BodyGlyph.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/ControlBodyGlyph.cs @@ -1,10 +1,11 @@ -// Licensed to the .NET Foundation under one or more agreements. +// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable enable using System.ComponentModel; +using System.Diagnostics; using System.Drawing; namespace System.Windows.Forms.Design.Behavior @@ -13,6 +14,7 @@ namespace System.Windows.Forms.Design.Behavior /// This Glyph is placed on every control sized to the exact bounds of /// the control. /// + [DebuggerDisplay("{GetType().Name, nq}:: Behavior={Behavior.GetType().Name, nq}, {_hitTestCursor}")] public class ControlBodyGlyph : ComponentGlyph { private Rectangle _bounds; //bounds of the related control diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/GrabHandleGlyph.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/GrabHandleGlyph.cs index 61c90980e47..9c49f9baa65 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/GrabHandleGlyph.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/Behavior/GrabHandleGlyph.cs @@ -14,6 +14,7 @@ namespace System.Windows.Forms.Design.Behavior /// Note that the pen and brush are created once per instance of this class and re-used in our painting logic /// for perf reasons. /// + [DebuggerDisplay("{GetType().Name, nq}:: Behavior={Behavior.GetType().Name, nq}, {rules}, {hitTestCursor}")] internal class GrabHandleGlyph : SelectionGlyphBase { private readonly bool _isPrimary;