Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
App Screen too big for laptop
Message
From
07/03/2012 11:17:02
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
ASP.NET
Category:
Windows Presentation Foundation (WPF)
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01537496
Message ID:
01537507
Views:
60
>Hi all, I just installed an app of mine on a laptop and guess what ? the main opening form ( which has a lot of info on it ) is way too large for the laptop. I seem to recall in VFP there was a maximum design area which gave you a pretty good idea what would fit - is there something like this in VS ? or is this the wrong way to go ? ( I have a feeling it is :-( ) All suggestions gratefully received


In WPF, in the MyWindow.xaml, you can add a Height and Width, MaxHeight and MaxWidth to your layout root. This will constrain the form to the size you set. If you use proportional spacing in your layout root rather than specify columns and rows hardcoded to a Heigth and width, you will allow the form to shrink or grow to fill the available space. You want to get away from the VFP mentaility that everything is hardcoded to width and height. You allow the elements on WPF/Silverlight to fill the space you create for them dynamically.

I've attached a small sample from a silverlight app which is similar:

Let me know if you have any questions...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform