views:

202

answers:

4

Hi,

I want to access the display properties of the client desktop in silverlight application and modify the application layout according 2 the ones set on client machine. When we right click on desktop and choose properties we get display properties dialog. i want to access appearance and theme properties from this. i hv to retrieve the appearance properties like font, theme etc and apply them in my silverlight application. I am also not sure whether this can be done in a normal web application.

Tried to google it but could find anything except code for resizing. But I want to access not only the screen width and height but the appearance settings also.

Any help would be appreciated.

Thanks :)

A: 

No way. This is private data that should not be exposed to any other domains.

spender
A: 

Not sure if this applies to Silverlight, but check out this question regarding different styles based on the current windows theme.

As far as the width/height, unless your running your silverlight app in fullscreen, what should be more important is the browser window width/height as that will not always be the same size as the screen itself. You should be able to google for code for how to get the browser window width/height rather easily.

Jason Miesionczek
A: 

The Silverlight sandbox prevents access to the client machine. You could try using a ActiveX control to expose the data to the silverlight control or you could use a WPF browser app with elevated trust permissions.

Jacob Adams
A: 

you can use javascript to get height and width , and send those values as startup params to silverlight application

prakash

related questions