I am developing a windows phone 7 app. I am using many controls in my app pages.
I am using a resolution of 480 x 800 now to develop my project, so now am hardcoding the height and width just to looks better in this resolution. But if the app is using in an another resolution (higher or smaller than 480 x 800) the interfaces may looks bad. I did not tested it yet,because of no other resolution available here now. So I need to aware of this possibility too in future.
How can I automatically set the control height properties based on the screen resolution. ?
Is there any way in windows phone to set the control height and width by percentage base just like in html (ie div height=”10%” width=”5%”) ?
?
Thanks.
Well for now the hardware specifications for any Windows Phone dictate that it must be 480 x 800. There are no phones out there that are anything else. I haven’t heard of any way to programmatically grab that, and since all phones are the same resolution I don’t see why they’d put it in. Maybe they’ll add something like this when apollo drops (if they add different resolutions then).
But have you tried using *? It’s like % in xaml