Skip to main content

Microsoft Silverlight

Answered Question Full Screen input problemRSS Feed

(0)

nba_bogdan
nba_bogdan

Member

Member

1 points

10 Posts

Full Screen input problem

Hi,

I am having some problems with the Silverlight full screen mode.

If I switch my application to full screen all the input from the keyboard is not handled. No textbox input, no key down / key up event and probably much more. Here is a sample application that demonstrates this :

Xaml :

<Canvas>

<TextBlock Text="Try some input:" Canvas.Top="10" Width="100"></TextBlock>

<TextBox x:Name="tboxInput" Width="100" Canvas.Top="30"></TextBox>

<Button x:Name="btnFullScreen" Content="Go Full Screen" Canvas.Top="60"></Button>

</Canvas>

Code behind:

public Page()

{

InitializeComponent();

btnFullScreen.Click +=
new RoutedEventHandler(btnFullScreen_Click);

}

void btnFullScreen_Click(object sender, RoutedEventArgs e)

{

Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;

if (!Application.Current.Host.Content.IsFullScreen)

btnFullScreen.Content = "Go Full Screen";

else

btnFullScreen.Content = "Go Normal Screen";

}

It is simple to see that in full screen mode you can't write text in the textbox. Am I doing something wrong here ? Is there another way to switch full screen so this will not happen ?

Regards,

skm.software@yahoo.com
skm.soft...

Member

Member

196 points

216 Posts

Re: Full Screen input problem

Hi
If you make your's controls like textbox, textblock z-index more than the z-index of medie-element,
It will solve the problem for you.
Sachin Mukhija

 

Sachin Mukhija
"Please Mark as answer if answer is correct".

Tim Dawson
Tim Dawson

Participant

Participant

1114 points

215 Posts

Re: Full Screen input problem

I think the previous poster misunderstood your question.

Keyboard input is not supported in fullscreen Silverlight beyond simple arrow keys etc. Certainly no characters can be entered. This is a security limitation and cannot be changed.


Microsoft MVP
Controls for Silverlight, WPF and Windows Forms at http://www.divelements.co.uk

nba_bogdan
nba_bogdan

Member

Member

1 points

10 Posts

Answered Question

Re: Re: Full Screen input problem

Thanks, I found that out too :).

This MSDN article gives a more detailed reason:

When a Silverlight plug-in is in full-screen mode, it disables most keyboard events. This limitation of keyboard input during full-screen mode is a security feature, and is intended to minimize the possibility of unintended information being entered by a user. In full-screen mode, the only input allowed is through the following keys.

UP ARROW, DOWN ARROW, LEFT ARROW, RIGHT ARROW, SPACEBAR, TAB, PAGE UP, PAGE DOWN, HOME, END, ENTER

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities