Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Override ScrollViewer size
Message
From
10/04/2009 14:15:34
 
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01393942
Message ID:
01394169
Views:
35
>Oh, I also tried the above without the Grid (binding to the Window.ActualHeight). That gave the required vertical scroll bar behaviour - but the horizontal scrollbar disappeared. Haven't figured out why that might be.....
>Best,
>Viv

That was why I stuffed the Grid in there Window.ActualHeight doesn't give you the size of the client area, it gives you the size of the window including it's borders. Stuffing the grid in there was a quick and dirty way to get the size of client area. Border might have been a better choice, I think it has less overhead.

One comment on that, not related to what we are talking about here, but that might help someone down the line. If you want a fixed sized window, don't set the size on the window, set SizeToContent="WidthAndHeight" on the window and set the height and width on the first child, a Vista window has a different border size than an XP window. So if you set the size on the window your client area will be different.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform