Question

Would it be possible to show an image in full screen mode using silverlight. I'm looking out for some thing like the full screen option of the flash video players.

Was it helpful?

Solution

You can set

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

this has to be done from a mouse button event or a click, you can't force the user into full screen without some interaction on their part.

Then you'll need to scale the image. If it's in an element that scales automatically, like a Grid cell and the Grid resizes automatically (like if it's the root element on the page and the page doesn't have a width or height specified) then you're good, but otherwise you'll need to handle the Application.Current.Host.Content.FullScreenChanged event and either resize or apply a scale transform to the image or its container to make it fill the screen, and do the same when you go back to non full screen mode.

OTHER TIPS

Set System.Windows.Interop.BrowserHost.IsFullScreen = true.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top