public Snapshot(IDockingContent content) { //Key = content.ContentKey; //Uri = BaseUriHelper.GetBaseUri(content as DependencyObject).AbsolutePath; //var args = new SerializationEventArgs(content); //content.OnSerializing(args); //Data = args.Data; //Caption = content.Title; }
public ContentCancelEventArgs(IDockingContent content, bool cancel) : base(cancel) { Content = content; }
public ContentCancelEventArgs(IDockingContent content) { Content = content; }
public static LayoutContent AddToLayout(this DockingManager dockManager, IDockingContent docking) { if (docking is DockingAnchorable) return AddToLayout(dockManager, (DockingAnchorable)docking); if (docking is DockingDocument) return AddToLayout(dockManager, (DockingDocument)docking); throw new InvalidCastException(); }
public void Close(IDockingContent content) { var layout = m_Contents.Values.FirstOrDefault(p => p.Content == content); layout.Close(); }
public void Show(IDockingContent content) { ShowWindow(m_Window); if (m_Contents.ContainsKey(content.ContentKey)) { var layout = m_Contents[content.ContentKey]; if (layout is LayoutAnchorable) { var anchor = layout as LayoutAnchorable; if (anchor.IsHidden || anchor.IsAutoHidden) { anchor.IsActive = true; anchor.Show(); } } layout.IsActive = true; } else { var docking = m_DockingManager.AddToLayout(content); m_Contents.Add(content.ContentKey, docking); } }