Tips & Tricks: How to get the Screen Resolution in Silverlight?

In this Tips & Tricks, I will show you the steps by which you can get the Screen Resolution of Client’s PC in Silverlight Application. It is quite simple. You have to just call the HTML DOM object to receive the handle of the screen and from that you can easily get the Screen Resolution.

To get the Screen Resolution, you need to get the handle of the Window and you can get it from:


Now from that object, you can call the Eval() with proper parameter “screen.width” or “screen.height” to get the Screen Width or Screen Height respectively. Those will give you the Screen Resolution. Suppose, you received Width = 1024 & Height = 768, means your Screen Resolution is: 1024 x 768.


Here is the complete code:


From the above code, you can easily understand how we are collecting the Screen Resolution of the user’s screen. Hence, use it whenever you need.

If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter, Facebook, Google+ and LinkedIn. I would love to hear your thoughts and opinions on my articles directly.

Also, don't forget to share your views and/or feedback in the comment section below.


  1. Great post man. Thx for sharing this good post.

  2. problem in screen resolution in silverlight

  3. Hi Sathyan,
    Can you tell me exactly what problem you are facing? So that, I can help you...

  4. Hi Kunal, I am developing a project in silverlight. I want that project to look similar in all possible desktop resolutions. i tried to find a solution in Google. But i am invein. Please suggest me something. pls forward a mail [email protected]

  5. I want my silverlight application look same in all resolutions. please tell me some solution at [email protected]


© 2008-2018 Kunal-Chowdhury.com | Designed by Kunal Chowdhury
Back to top