Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any default strategy to prepare application for a resolution change?

How to prepare a Silverlight or WPF application to change from a big resolution to a small resolution?

I guess using dockpanel strategy only works for changing from a small to a big resolution.

So, is there any default strategy? Thanks.

Problem: I have a button the ends in the pixel 1024, 768. And I change the resolution to 800x600.

like image 781
alansiqueira27 Avatar asked Apr 12 '11 12:04

alansiqueira27


People also ask

What is resolution in application?

Resolution refers to the number of pixels on display. For example, a display with 720 x 1280 pixels is much higher than a display with 480 x 800 pixels.

How do you present a resolution?

A resolution must be moved by a senator (typically the chair of the sponsoring committee). For example, “I move that Resolution #.... be placed on the floor of the Senate.” The motion must be seconded by a senator (typically a committee member involved in its development.


2 Answers

Some time ago I had a similar issue. As a workaround I surrounded the window content in a Viewbox.

Users that used 1024x768 instead of 1280x1024 see the application content smaller, but they preferred this than scrolling all the time. (WPF)

I'll have to work on this for our next project, let's hope somebody has better ideas!

like image 72
Haplo Avatar answered Oct 06 '22 01:10

Haplo


Well, you could design your layout to Stretch and designing it with 800x600 in mind, so whenever the layout becomes larger than 800x600 it will fit. But...

if you really want something fancy, detect the change in the window size/ActualHeight and ActualWidth (using SizeChanged) then scale the the application according to size via code (using dynamic transforms).

For example, in the "LayoutRoot" in your main view:

var x = new ScaleTransform();
            x.ScaleX = .5; // Do fancy computation here
            x.ScaleY = .5; // Do fancy computation here
            this.LayoutRoot.RenderTransform = x;

Just an idea, i mean if the screen is bigger than your design you enlarge and vice versa.

Hope this helps.

like image 39
Vinny Marquez Avatar answered Oct 06 '22 01:10

Vinny Marquez