Silverlight Can Go Full Screen and Back

So you want your Silverlight video player to play in full screen? No problem! It's pretty easy to go into full screen mode, hiding everything including browser frame, in Silverlight. It's just a line of code:
Interop.BrowserHost.IsFullScreen = True
While in full screen mode, user can press ESC key to exit full-screen mode, or your Silverlight application can exit programatically by:
BrowserHost.IsFullScreen = False
You can easily toggle between full screen modes by:
BrowserHost.IsFullScreen = Not BrowserHost.IsFullScreen
The BrowserHost class exposes two events FullScreenChange() which fires when the full screen mode is changed, and Resize() event which fires when the host element is resized (not when browser is resized). You can use these events to detect when user gets into and out of full screen mode. It's also worth mentioning that all keyboard events will not fire in full screen mode, only mouse events will. This feature is to protect user from password spoofing and other impersonation attacks.

Yorum Gönder

0 Yorumlar

Ad Code

Responsive Advertisement