private void OpenDocumentRequestHandler(object data) { var filename = data.ToString(); var firstDocumentPane = dockManager.Layout.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault(); if (firstDocumentPane == null) return; var doc = new LayoutDocument { Title = filename }; var ev = new EditView(); ev.OpenFile(filename); doc.Content = ev; firstDocumentPane.Children.Add(doc); }
private void OpenDocumentRequestHandler(object data) { var filename = data.ToString(); var firstDocumentPane = dockManager.Layout.Descendents().OfType <LayoutDocumentPane>().FirstOrDefault(); if (firstDocumentPane == null) { return; } var doc = new LayoutDocument { Title = filename }; var ev = new EditView(); ev.OpenFile(filename); doc.Content = ev; firstDocumentPane.Children.Add(doc); }