internal static void RegistDragHost(AnyDockPanel panel) { var window = Window.GetWindow(panel); if (window != null) { WindowTable.Add(panel, window); ReferenceTable[window] = ReferenceTable.TryGetValue(window, out uint count) ? count + 1 : 1; } }
internal static void UnregistDragHost(AnyDockPanel panel) { if (WindowTable.TryGetValue(panel, out Window window)) { WindowTable.Remove(panel); var count = ReferenceTable[window] - 1; if (count == 0) { ReferenceTable.Remove(window); } else { ReferenceTable[window] = count; } } }