Piaz files wasn't associated during setup.
[master-thesis.git] / Parasitemia / ParasitemiaUI / Analysis.fs
index 9c7ddf0..2506015 100644 (file)
@@ -21,8 +21,8 @@ open Types
 let showWindow (parent: Window) (state: State.State) : bool =
     let win = Views.AnalysisWindow()
     win.Root.Owner <- parent
-    win.Root.Left <- parent.Left + parent.ActualWidth / 2. - win.Root.Width / 2.
-    win.Root.Top <- parent.Top + parent.ActualHeight / 2. - win.Root.Height / 2.
+    win.Root.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Root.Width / 2.
+    win.Root.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Root.Height / 2.
 
     let logListener =
         { new Logger.IListener with