I would suggest you start by learning about all the different types of
Panel controls (Canvas, Grid, WrapPanel, etc) which will hopefully help
you to fall into the practice of designing your views with control
resizing in mind.
You may also consider using a ViewBox control which will can scale the
entire contained layout.
Finally and probably more advanced, if you are using MVVM you may
consider changing the view over a single ViewModel based on the size of
the Page/Window. For example, when the Page/Window is very small you
could design ListBoxes to dominate the real estate, whereas as the user
increases the size of the Page/Window you could add more detail
(TextBoxes, TextBlocks, Images, etc) that make better use of the real
estate.
Carl.
From: [email protected] [mailto:[email protected]]
On Behalf Of Shane Morris (Automatic Studio)
<[email protected]>
Sent: Monday, 28 February 2011 4:43 PM
To: ozWPF <[email protected]>
Subject: RE: WPF application to allow for different screen resolutions
I agree that normally, rather than scale up items like label fonts, one
would identify the areas of the UI that can scale to show more
information. List boxes, borders, maybe text boxes etc. If users want
larger fonts they should adjust their font metrics in windows and the
WPF app should respect those settings (rather than growing with the
screen size).
A sensible layout hierarchy and judicious use of 'Auto' sizing will get
you a long way.
Bear in mind though that large blocks of text become difficult to read
if they are too wide. (~10 words wide is considered 'optimal'). You may
want to set a maxwidth on these, for example. (Unfortunately, maxwidth
is specified in pixels, which doesn't allow you to factor in different
font metrics.)
Of course there are exceptions. Touch displays come immediately to mind.
Shane
Shane Morris | Automatic Studio | [email protected] |
twitter.com/shanemo
-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Winston Pang
Sent: Monday, 28 February 2011 7:36 PM
To: ozWPF
Subject: Re: WPF application to allow for different screen resolutions
Honestly, most of the time you don't have to do too much, it seems to
function pretty well, whether it be resolutions and DPI (apart from
manually positioning windows, you'll need to factor in DPI in the
calculation).
A rule of thumb that I have read before is, try to limit fix heights and
widths unless that's the requirement or the design, otherwise, most say
you should just let it all stretch out and take up all the room, and
then depend on margins/padding to fix up layout and spacing.
I think WPF does a pretty good job at handling most of it for you
anyways.
On Mon, Feb 28, 2011 at 7:19 PM, Peter Maddin <
[email protected]> wrote:
> When I developed WinForms applications I did so at a certain screen
> resolution.
>
> Clients use any number of screen resolutions.
>
> When they chose to use a screen resolution that was significantly
> different from what I was using there were problems with the way
> controls were rendered.
>
> My understanding was that WPF could address this sort of issue.
>
> What should one do to ensure that one's WPF applications will look the
> same (as much as it is possible) so that any controls resize
> appropriately and textblocks, textboxes scale their font size
appropriately.
>
>
>
> My current focus has been getting my application to play nicely with
> thread that consumes a wcf web service and a loadable COM dll. This is
> working ok and now I need to focus on the GUI side of things.
>
>
>
> I have seen a zoom control in WPFExtensions in CodePlex
> (http://wpfextensions.codeplex.com/)
>
>
>
> Is this an approach I should use or is there a better way? I would
> like the whole application to be resized not just a user control.
>
>
>
> Any feedback very much appreciated.
>
>
>
> Regards Peter Maddin
> Applications Development Officer
> PathWest Laboratory Medicine WA
> Phone : +618 6396 4285
> Mobile: 0414 240 307
> E-Mail : [email protected]; [email protected] The
> contents of this e-mail transmission outside of the WAGHS network are
> intended solely for the named recipient's), may be confidential, and
> may be privileged or otherwise protected from disclosure in the public
interest.
> The use, reproduction, disclosure or distribution of the contents of
> this e-mail transmission by any person other than the named
> recipient(s) is prohibited. If you are not a named recipient please
> notify the sender immediately.
>
>
>
>
>
> _______________________________________________
> ozwpf mailing list
> [email protected]
> http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
>
>
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
________________________________________________________________________
_______
This email has been scanned by the Bankwest Email Security System.
________________________________________________________________________
_______
_______________________________________________________________________________
Unencrypted electronic mail is not secure and may not be authentic.
If you have any doubts as to the contents please telephone to confirm.
This electronic transmission including any attachments is intended only
for those to whom it is addressed. It may contain copyright material or
information that is confidential, privileged or exempt from disclosure by law.
Any claim to privilege is not waived or lost by reason of mistaken transmission
of this information. If you are not the intended recipient you must not
distribute or copy this transmission and should please notify the sender.
Your costs for doing this will be reimbursed by the sender.
We do not accept liability in connection with computer virus, data corruption,
delay, interruption, unauthorised access or unauthorised amendment.
_______________________________________________________________________________
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf