Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Core/src/Handlers/View/ViewHandler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Maui.Graphics;
using System.Diagnostics;
#if __IOS__ || MACCATALYST
using PlatformView = UIKit.UIView;
#elif __ANDROID__
Expand All @@ -18,6 +19,7 @@ namespace Microsoft.Maui.Handlers
/// </summary>
/// <remarks>Handlers map virtual views (.NET MAUI layer) to controls on each platform (iOS, Android, Windows, macOS, etc.), which are known as platform views.
/// Handlers are also responsible for instantiating the underlying platform view, and mapping the cross-platform control API to the platform view API. </remarks>
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
public abstract partial class ViewHandler : ElementHandler, IViewHandler
{
/// <summary>
Expand Down Expand Up @@ -536,5 +538,11 @@ public static void MapToolTip(IViewHandler handler, IView view)
handler.ToPlatform().UpdateToolTip(tooltipContainer.ToolTip);
#endif
}

private protected virtual string GetDebuggerDisplay()
{
var debugText = DebuggerDisplayHelpers.GetDebugText(nameof(VirtualView), VirtualView, nameof(PlatformView), PlatformView);
return $"{GetType().FullName}: {debugText}";
}
}
}
Loading