Пример #1
0
        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);
        }
Пример #2
0
        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);
        }