protected override void FloatTabExecuted(FloatEventArgs e) { var item = e.DataContext as TabModel; Children.Remove(item); var group = new ToolWellModel() { IsWindow = true }; group.Children.Add(item); var wnd = new ToolWindow { Content = group, Left = e.VisualBounds.X, Top = e.VisualBounds.Y, Width = e.VisualBounds.Width, Height = e.VisualBounds.Height }; if (ParentContainer != null && ParentContainer.IsRafted && !ParentContainer.AllTabs.Any()) { ParentContainer.Host.TransitionTo(wnd); } else { wnd.Show(); wnd.DragMove(); } }
protected override void FloatAllExecuted(FloatEventArgs e) { var pc = ParentContainer; Remove(); IsWindow = true; var wnd = new ToolWindow { Content = this, Left = e.VisualBounds.X, Top = e.VisualBounds.Y, Width = e.VisualBounds.Width, Height = e.VisualBounds.Height }; if (pc.Host != null && !pc.AllTabs.Any()) { pc.Host.TransitionTo(wnd); } else { wnd.Show(); wnd.DragMove(); } }
protected override void FloatAllExecuted(FloatEventArgs e) { var pvm = ParentViewModel; Remove(); IsWindow = true; var wnd = new ToolWindow { Content = this, Left = e.VisualBounds.X, Top = e.VisualBounds.Y, Width = e.VisualBounds.Width, Height = e.VisualBounds.Height }; if (!pvm.AllTabs.Any()) { ShowOnClose(pvm.Host, wnd); } else { wnd.Show(); wnd.DragMove(); } }