Silverlight – Why can’t I get the keyboard input event in full screen mode?

I encountered some problems in Silverlight full screen mode.

If I switch the application to full screen, all keyboard input will not be processed. There is no text box input, no keypress/keypress events, there may be more. Here is a sample application that demonstrates this:

Xaml:

 







Behind the code:

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 easy to see that in full screen mode, you cannot write text in the text box. Am I doing something wrong here? Is there any other way to switch full screen, so this won’t happen?

This link can help you: http://silverlight.net/forums/p/11519/ 36798.aspx

Edit

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

I have encountered some problems in Silverlight full screen mode.

If I switch the application to full screen, then Does not process all keyboard input. There is no text box input, no keystrokes/key events, and there may be more. Here is a sample application that demonstrates this:

Xaml:









< p>Behind the code:

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 easy to see that in full screen mode, you cannot Write text in. Am I doing something wrong here? Is there any other way to switch full screen, so this won’t happen?

This link can help you: http://silverlight.net/forums/p/11519/36798.aspx

Edit

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

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4031 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.