- let ctrl (name: string): 'a = window.Root.FindName(name) :?> 'a
-
- let butClose: Button = ctrl "butClose"
- let txtAbout: TextBlock = ctrl "txtAbout"
-
- let linkHESSO: Documents.Hyperlink = ctrl "linkHESSO"
- let linkCHUV: Documents.Hyperlink = ctrl "linkCHUV"
- let linkGBurri: Documents.Hyperlink = ctrl "linkGBurri"
+ win.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Width / 2.
+ win.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Height / 2.