views:

76

answers:

3

Hi,

I want to disable the F11 key in my silverlight application , because I dont want user to sqwitch to full screen mode.

Or if is there a way I can write my code for f11 key event , I tried with key down event , but not working for f10 and f11 and set of other keys .

Thanks, Subhen

+1  A: 

I suspect the browser has precedent over the Silverlight plugin.

You could use Javascript to disable key input. Here's a blog post about how: Disable ctrl + n and other ctrl + key combinations in JavaScript

rdkleine
A: 

Use a hammer. Much more fun. Extra points for "Hulk Smash!" popups.

samoz
+1  A: 

Silverlight prohibits switching to and from fullscreen mode except when handling a user event (such as clicking a button or link), so there is no way of detecting that a user goes full-screen and then reverting it.

From what I can find in the documentation, there is also no way of preventing an application going fullscreen.

On the other hand, MSDN states that a Silverlight application can only work in two-ways: embedded or fullscreen. So if you embed your application this should not be a problem, because full-screen switching in an embedded Silverlight application will only happen if you set Host.Content.IsFullScreen to true.

Read more about Silverlight and fullscreen support.

ErikHeemskerk
I believe he is talking about the browser's full screen mode, not Silverlights. Most web browsers will expand to fill as much screen real estate as possible when you hit F11 - the Browser still shows its navbar and tabs however. The closest possible answer might be rdkleine's answer, but it's still something users could override.
free-dom