![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | How to get the "client area" of a window? When a window is resized the SizeChangedEventArgs only give me the new size of the whole window including title and borders. How do I get the width and height of what was formerly known as "client area" of a window? In GDI the answer was given by GetClientRect(). What's it in WPF? |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: How to get the "client area" of a window? fo wrote: > When a window is resized the SizeChangedEventArgs only give me the new > size of the whole window including title and borders. How do I get the > width and height of what was formerly known as "client area" of a > window? In GDI the answer was given by GetClientRect(). What's it in > WPF? You can get the ActualWidth/Height of the window's content (the root) element. HTH, Drew ___________________________________ Drew Marsh Chief Software Architect Mimeo.com, Inc. - http://www.mimeo.com Microsoft C# / WPF MVP Weblog - http://blog.hackedbrain.com/ |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: How to get the "client area" of a window? Well, it's just the other way around: I want to resize the window's root element (a canvas) to its client area. So I'd better ask how to do this. Thanks, fö "Drew Marsh" wrote: > fo wrote: > > > When a window is resized the SizeChangedEventArgs only give me the new > > size of the whole window including title and borders. How do I get the > > width and height of what was formerly known as "client area" of a > > window? In GDI the answer was given by GetClientRect(). What's it in > > WPF? > > You can get the ActualWidth/Height of the window's content (the root) element. > > HTH, > Drew > > ___________________________________ > Drew Marsh > Chief Software Architect > Mimeo.com, Inc. - http://www.mimeo.com > Microsoft C# / WPF MVP > Weblog - http://blog.hackedbrain.com/ > > > |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: How to get the "client area" of a window? fö wrote: > Well, it's just the other way around: I want to resize the window's > root element (a canvas) to its client area. So I'd better ask how to > do this. Perhaps I don't undersand, this should be automatic. The Window always stretches its content to fit the client area. Do you have a screenshot of what you're experiencing vs. what you're expecting? Cheers, Drew |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Not responding when closing "Local Area Connection Properties" box | problem man | Vista networking & sharing | 0 | 05-22-2008 02:44 AM |
| Vista style status bar and preview area in "find file" window | Spike Spiegel | Vista General | 1 | 04-11-2008 01:42 PM |
| changing the "documents" location to a network area | Stevie G | Vista General | 1 | 05-25-2007 09:34 AM |
| Where are settings for "Confirm after download" & "in same window" | Roland | Vista performance & maintenance | 0 | 12-22-2006 08:43 AM |
| What's "Tunnel adapter Local Area Connection" | cstrike | Vista networking & sharing | 0 | 10-09-2006 05:31 AM |