WindowState.Maximized -- How to get the proper size of the window? [modified]
-
I have a borderless window. A double click on it maximizes it - WindowState.Maximized and WindowStyle set to None. Now I'm trying to get the proper size of that window so that I resize the internal controls. My screen resolution is: 1280 x 800 SystemParameters.MaximizedPrimaryScreenWidth 1288.0 double SystemParameters.MaximizedPrimaryScreenHeight 778.0 double What are these two properties supposed to return actually? Why the width is larger than my screen and the other one smaller? (on my screen visually the windows is OK) ---> Gets a value that indicates the height, in pixels, of a maximized top-level window on the primary display monitor. ---> Gets a value that indicates the width, in pixels, of a maximized top-level window on the primary display monitor. ??? Or SystemParameters.FullPrimaryScreenWidth - 1280 SystemParameters.FullPrimaryScreenHeight - 744 What is the proper way to get the system metrics in WPF? Or there isn't one? SystemParameters.VirtualScreenWidth SystemParameters.VirtualScreenHeight
modified on Friday, August 14, 2009 7:15 AM