Silverlight Full Screen Mode
A web application will look more like desktop software if it is displayed in full screen mode rather than inside the browser.
How to enter full screen mode
The FullScreen property displays the ActiveX control in full screen mode. This property applies to the <div> tag, which we set as a container in our examples and followed by the agHost () constructor.
When the interface is in full screen mode, you return to normal mode by pressing the Escap key.
Click on the following image to see it in full screen mode:
XAML ID:
<Rectangle Height="240" Width="320" Stroke="Black" StrokeThickness="1" MouseLeftButtonDown = "javascript:enlarge" >
Full XAML code.
We associate with the MouseLeftButtonDown event, in other words, by pressing the left mouse button, the JavaScript function "enlarge..."
JavaScript code:
Control access requires a JavaScript variable representing it. This string will be used after calling the agHost () constructor. We will call our variable "application":
var application = document.getElementById("agControl1");
The agControl1 argument is the identifier specified for the ActiveX control as the second parameter of the agHost () function.
The FullScreen property is set to true to enter full-screen mode.
function enlarge(sender, args) { application.fullScreen = true; }
You can also switch between true and false (true and false):
function enlarge(sender, args) { application.fullScreen = ! application.fullScreen; }
Entering full-screen mode or returning to browser mode triggers the FullScreenChanged event. Therefore, a JavaScript function is associated with this event to do something when the user changes the screen mode:
FullScreenChanged = "javascript:faireQuelqueChose";
This assumes that the JavaScript function faireSomething () is set for this purpose.