John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Catégorie:
Windows Presentation Foundation (WPF)
Versions des environnements
Network:
Windows 2000 Server
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement