fix(dock): fix build break and clean up logging/event patterns

This commit is contained in:
2026-03-28 17:38:07 +09:00
parent 287b3b303f
commit c77592d479
3 changed files with 8 additions and 2 deletions

View File

@@ -442,8 +442,14 @@ public sealed partial class DockLayout : Control
var result = TabTearOffService.TryTearOffTab(sourceNode.Items, args.Item, (tab) =>
{
var handler = TabTornOff;
if (handler == null)
{
throw new InvalidOperationException("No tear-off handler attached.");
}
// Raise event to let the host handle window creation
TabTornOff.Invoke(this, new TabTornOffEventArgs(tab, sourceNode));
handler.Invoke(this, new TabTornOffEventArgs(tab, sourceNode));
}, sourceNode);
if (result.IsSuccess)