private FrwDocContent CreateDocContentByIContent(IContent c) { FrwDocContent cc = new FrwDocContent(c); c.ContentContainer = this; cc.FormClosed += Content_FormClosed; OnDocContentCreated(cc.ContentControl); return(cc); }
public void SetNewCaption(string caption) { Text = caption; FrwDocContent c = FindDocContentContainer(this); if (c != null) { c.Text = caption; } }
private FrwDocContent FindJustDocContentByIContent(IContent c) { FrwDocContent cc = null; foreach (var v in dockPanel.Contents) { if (v is FrwDocContent && (v as FrwDocContent).ContentControl == c) { cc = (v as FrwDocContent); } } return(cc); }
protected void AppManager_OnDocContentShowEvent(object sender, DocContentShowEventArgs e) { if (e.Content.ContentContainer == null) { throw new Exception(""); } if (e.Content.ContentContainer == this) { FrwDocContent cc = FindJustDocContentByIContent(e.Content); if (cc != null) { cc.Show(dockPanel);//, DockState.Document); } } }