Window Client Size?<p align=left><font face=Arial size=2>hi,</font></p> <p> </p> <p align=left>can anyone tell me if its possable to get the size of the window client area? and if so how?</p> <p align=left> </p> <p align=left>cheers,</p> <p align=left>Philly</p>© 2009 Microsoft Corporation. Všechna práva vyhrazena.Thu, 19 Jun 2008 00:15:52 Zee49f138-4af0-4829-9290-6fb2cce22f9fhttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/ee49f138-4af0-4829-9290-6fb2cce22f9f#ee49f138-4af0-4829-9290-6fb2cce22f9fhttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/ee49f138-4af0-4829-9290-6fb2cce22f9f#ee49f138-4af0-4829-9290-6fb2cce22f9fStaticPhillyhttp://social.msdn.microsoft.com/Profile/cs-CZ/?user=StaticPhillyWindow Client Size?<p align=left><font face=Arial size=2>hi,</font></p> <p> </p> <p align=left>can anyone tell me if its possable to get the size of the window client area? and if so how?</p> <p align=left> </p> <p align=left>cheers,</p> <p align=left>Philly</p>Fri, 21 Sep 2007 13:26:16 Z2007-09-23T05:12:55Zhttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/ee49f138-4af0-4829-9290-6fb2cce22f9f#a237e553-16eb-4feb-ac9b-8b6d29150ce2http://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/ee49f138-4af0-4829-9290-6fb2cce22f9f#a237e553-16eb-4feb-ac9b-8b6d29150ce2Marlon Grechhttp://social.msdn.microsoft.com/Profile/cs-CZ/?user=Marlon%20GrechWindow Client Size?<br>what do you mean by Window client area??? is it te size of the window including the titlebar?<br>Fri, 21 Sep 2007 17:33:44 Z2007-09-21T17:33:44Zhttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/ee49f138-4af0-4829-9290-6fb2cce22f9f#f963ef75-b1a7-4eda-aae1-eda7fcf613aehttp://social.msdn.microsoft.com/Forums/cs-CZ/wpf/thread/ee49f138-4af0-4829-9290-6fb2cce22f9f#f963ef75-b1a7-4eda-aae1-eda7fcf613aeHua Wang - MSFThttp://social.msdn.microsoft.com/Profile/cs-CZ/?user=Hua%20Wang%20-%20MSFTWindow Client Size?<p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font size=3><font face=Calibri>You can get the client size via the the window visual tree root’s ActualWidth/Height, e.g,</font></font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri size=3> </font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font size=3><font face=Calibri>FrameworkElement f =  VisualTreeHelper.GetChild(window, 0) as FrameworkElement;</font></font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font size=3><font face=Calibri>f.ActualWidth/Height</font></font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri size=3> </font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font size=3><font face=Calibri>In Window’s default style, the visual tree root is a Border.</font></font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font face=Calibri size=3> </font></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="color:#1f497d"><font size=3><font face=Calibri>If your content is FrameworkElement and its layout behavior is sized to container, you can get the ActualWidth/Height directly of window.Content.</font></font></span></p>Fri, 21 Sep 2007 19:29:26 Z2007-09-23T05:12:55Z