spshah

Hello everyone,

I am developing an client/sever application using wpf and wcf, in which when i run the client application on different screen resolution, then the controls(i.e. the size) added in the xbap page changes. So i want to get the current screen resolution and make the size of controls unchangable.Can anyone help me out.



Re: Windows Presentation Foundation (WPF) How to get the screen resolution in wpf

Peter Ritchie

The Windows Presentation Foundation ("Avalon") forum seems a better place for this question to get an answer, moving from Visual C# General.




Re: Windows Presentation Foundation (WPF) How to get the screen resolution in wpf

footballism

There is two properties you can look into:
System.Windows.SystemParameters.PrimaryScreenWidth;
System.Windows.SystemParameters.PrimaryScreenHeight;

Sheva





Re: Windows Presentation Foundation (WPF) How to get the screen resolution in wpf

lester - MSFT

look at systemparameters... you can find a lot of useful info there...



Re: Windows Presentation Foundation (WPF) How to get the screen resolution in wpf

spshah

Thanks lester and footballism. It worked.





Re: Windows Presentation Foundation (WPF) How to get the screen resolution in wpf

k.Rahul

hi shah,

I have same problem. When i change screen resolution of system , my application controls size get increased .

how can i solve this problem Hope for any reply.






Re: Windows Presentation Foundation (WPF) How to get the screen resolution in wpf

LesterLobo - MSFT

the size you see on screen would change because you are changing the screen resolution. However, querying the control size should return the same value as before



Re: Windows Presentation Foundation (WPF) How to get the screen resolution in wpf

k.Rahul

Hi,

I have set Page height and width in XAML Page. . But when i change screen resolution this height and width get changed.

What should i do to resolve this query