Silverlight 4: New features overview (Part 4) – Out-of-browser applications: even more features
In addition to previous features, Silverlight 4 adds some more nice improvements to Out-of-Browser model.
Now it allows to control Top/Left position of the out-of-browser window, bring it to the foreground (if not active), check if the window is topmost and define it’s Width/Height.
All those features being exposed by MainWindow object of Application:
Additional feature is Notification Window. It is a notification area that is displayed in the system area, at the bottom right part of the screen. In application described at previous post (here) I’ve added a button to show notification window.
I’ve added and Silverlight control to the project, and it will be the UI of my notification window:
At the “Notification” button event handler:
if (App.Current.IsRunningOutOfBrowser)
{
NotificationWindow nw = new NotificationWindow();
nw.Width = 250;
nw.Height = 100;
nw.Content = new Toast();
nw.Show(5000); //Show the window for 5 seconds
}
Running application:
Sample code here (also for the previous Elevated Out-of-Browser post).
Stay tuned for the next part – DataBinding improvements.
Enjoy,
Alex