private void OnItemDetached(object o, DetachedArgs args) { DockItem obj = o as DockItem; if (!obj.InReflow && !obj.IsAutomatic) { EmitLayoutChangedEvent(); } }
void OnHostDetached(object sender, DetachedArgs a) { // skip sticky objects if (sticky) { return; } // go up in the hierarchy DockObject newHost = host.ParentObject; while (newHost != null) { DockPlacement pos = DockPlacement.None; // get a placement hint from the new host if (newHost.ChildPlacement(host, ref pos)) { NextPlacement = pos; } else { Console.WriteLine("Something weird happened while getting the child placement for {0} from parent {1}", host, newHost); } // we found a "stable" dock object if (newHost.InDetach) { break; } newHost = newHost.ParentObject; } // disconnect host DisconnectHost(); // the toplevel was detached: we attach ourselves to the // controller with an initial placement of floating if (newHost == null) { newHost = this.Master.Controller; NextPlacement = DockPlacement.Floating; } if (newHost != null) { ConnectHost(newHost); } PrintPlacementStack(); }
void OnHostDetached(object sender, DetachedArgs a) { // skip sticky objects if (sticky) return; // go up in the hierarchy DockObject newHost = host.ParentObject; while (newHost != null) { DockPlacement pos = DockPlacement.None; // get a placement hint from the new host if (newHost.ChildPlacement (host, ref pos)) NextPlacement = pos; else Console.WriteLine ("Something weird happened while getting the child placement for {0} from parent {1}", host, newHost); // we found a "stable" dock object if (newHost.InDetach) break; newHost = newHost.ParentObject; } // disconnect host DisconnectHost (); // the toplevel was detached: we attach ourselves to the // controller with an initial placement of floating if (newHost == null) { newHost = this.Master.Controller; NextPlacement = DockPlacement.Floating; } if (newHost != null) ConnectHost (newHost); PrintPlacementStack (); }
private void OnItemDetached(object o, DetachedArgs args) { DockItem obj = o as DockItem; if (!obj.InReflow && !obj.IsAutomatic) EmitLayoutChangedEvent (); }