Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get screen workarea (not whole screen size) size in Silverlight?

I want to get the screen workarea size in Silverlight. Now I can get the screen size by using below code:

actualWidth = (double)System.Windows.Browser.HtmlPage.Window.Eval("screen.width");
actualHeight = (double)System.Windows.Browser.HtmlPage.Window.Eval("screen.height");

But it returns whole screen size that includes the TaskBar also. But I want to get only workarea size that excludes taskbar and so on. Like SystemParameters.WorkArea in WPF.

Can anyone guide me to get only screen workarea size in Silverlight?

like image 285
Selvamz Avatar asked Mar 28 '14 09:03

Selvamz


1 Answers

You can use:

  1. screen.availWidth - available screen Width
  2. screen.availHeight - available screen Height

Note: The screen.availWidth property returns the Width of the visitor's screen, in pixels, minus interface features like the Windows Taskbar.

like image 50
Rezoan Avatar answered Nov 14 '22 22:11

Rezoan