0

I have a problem with Silverlight 4. The problem is that i am developing on a 24" monitor screen. When i get home from work i continue to develop on my laptop which only has 19" monitor screen.

And what really irretates me is that the controls is not where i want them to be.

The controls are added upon each other. I am using simple controls like Buttons, textboxes etc.

I do also have the controls within a Grid.Row and a Grid.Column. I have tried with StackPanels also inside the grid and in the Columns etc. Also tried to have Stackpanel and a Grid inside, and i also tried with Canvas.

On Experts-Exchange a member wrote that this is a common problem in Silverlight - which i definitely do not believe.

1
  • 1
    I may be misunderstanding. I develop on an HD 24" monitor at work and take the laptop home to use the 15" screen. I never have this issue. But when I first started developing in SL I used grids for everything and some times experienced this. I like to use stackpanels now to position things more relatively when I can. Whith the grid are you using * with your measures? Commented Jun 25, 2011 at 2:22

2 Answers 2

1

I would agree that this is a common problem with Silverlight. It isn't that it isn't possible to get it right, but sometimes getting all of the controls to line up properly using different resolutions can be a challenge. Often a challenge that developers just don't take the time to solve.

For me it just comes down to trial and error with regards to setting row and column width/heights to Auto, *, and fixed and then combining this with StackPanels and ScrollViewers. I haven't used it, but I believe one of the Developer Toolkits had a StackGrid, or something like that. It combined the functionality of stackpanels and grids into a single control. I've heard others claim that using that control made things easier.

Pay attention to Vertical/Horizontal Alignment and Margins to help position the controls too.

Sign up to request clarification or add additional context in comments.

7 Comments

@Jeff - Any info on StackGrid would be usefull if you can pass it on. The Googles have nothing...
@Jeff Thank you very much. Could you please post a link to the StackGrid? I need to make a smooth design and i using differnt kind of Charts(silverlight Tool Kit) and it is much easiser to make good design with Expression Blend and Silverlight rather than using ASP.NET.
Well, I can't seem to find the control I was talking about. However, if you go here: silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/… you can find a DockPanel which may help you with your layout needs. I'll look some more for the control I was thinking of.
I found the control I was thinking of, but it I guess I misremembered what it did. While I think it is a good control, I don't think it will actually help your problem. (SuperStackPanel)
Yes, check out star. If you have anything that should be proportional, then start is typically used. It is rare that I use a grid without * being used somewhere.
|
0

When developing for multiple resolutions, use the design size handles to keep re-sizing your interface.

If the interface just cannot go below a certain size, set that as the MinHeight/MinWidth and place it all in a scrollviewer. That way scrollbars will simply kick in if the screen gets too small to be usable for your design.

Silverlight grids are a lot like HTML tables in that you need to flex them about a lot to ensure you have correctly linked to the right edges/positions. Silverlight has more options (thanks to stretch etc) and it just takes practice to learn how to nest the boxing model to do what you want.

1 Comment

Hi HiTech Magic. I have found out that using the Vertical, HorizonticalAlligenment property and setting it to Strech, gives a much more re-sizing controls. It didn't give a 100 Procent resize design but. Thanks all for the help provided i really appreciate it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.