Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
App Screen too big for laptop
Message
De
07/03/2012 11:17:02
John Baird
Coatesville, Pennsylvanie, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01537496
Message ID:
01537507
Vues:
59
>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...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform