public bool OpenEditDocument(DocumentReference document) { /*var vm = IoC.Get<DocumentEntryViewModel>(); * vm.Init(document); * * dynamic settings = new ExpandoObject(); * settings.Height = 600; * settings.Width = 640; * settings.SizeToContent = SizeToContent.Manual; * * return _windowManager.ShowDialog(vm, null, settings) == true;*/ var windowController = new WindowController { Title = "Document Editor" }; var control = new DocumentEntryControl(document, windowController); var window = new DialogWindow(control, windowController) { MinWidth = 400, MinHeight = 400, Height = Math.Min(Math.Max(636, SystemParameters.VirtualScreenHeight / 1.61), SystemParameters.VirtualScreenHeight) }; if (document.Collection.IsFilesOrChunks) { window.Width = Math.Min(1024, SystemParameters.VirtualScreenWidth); } window.Owner = windowController.InferOwnerOf(window); return(window.ShowDialog() == true); // TODO: Handle UpdateGridColumns(document.Value.LiteDocument) and UpdateDocumentPreview(); }
public bool OpenEditDocument(DocumentReference document) { /*var vm = IoC.Get<DocumentEntryViewModel>(); * vm.Init(document); * * dynamic settings = new ExpandoObject(); * settings.Height = 600; * settings.Width = 640; * settings.SizeToContent = SizeToContent.Manual; * * return _windowManager.ShowDialog(vm, null, settings) == true;*/ var windowController = new WindowController { Title = "Document Editor" }; var control = new DocumentEntryControl(document, windowController); var window = new DialogWindow(control, windowController) { Height = 600 }; window.Owner = windowController.InferOwnerOf(window); return(window.ShowDialog() == true); // TODO: Handle UpdateGridColumns(document.Value.LiteDocument) and UpdateDocumentPreview(); }