Silverlight

Window Closing Event

Intro When running Silverlight 4 out of the browser it could become handy to know that the application is being closed. In case of my open source demo application SilverAmp (http://SilverAmp.CodePlex.com) I wanted to notify the user the application is being closed when music is still playing. Catching the event In Silverlight 4 a new event has been added to the System.Window class. This event is raised when the application is being closed. Closed in any way: by the user hitting F4; by the user clicking on the right-top cross; by a calling close on the application from within code…

Silverlight

Custom Window Chrome

Intro Today I would like to explain something about customizing the window chrome in Silverlight 4 OOB. For an example of customizing the window have a look at my open source demo application SilverAmp which is available on http://SilverAmp.CodePlex.com. Choosing style Running the application without the default window chrome requires running out-of-browser with elevated trust. How to set elevated trust is explained in this earlier post. To set the window style, go to the Out-Of-Browser settings on the Application tab in the Project Settings. At the bottom there’s a dropdown list where you can select your preferred style. Default shows…

Silverlight

Elevated Trust

Intro This is the second article in a series of small articles about what is new in Silverlight 4 and Expression Blend 4. The series is build around a open source demo application SilverAmp which is available on http://SilverAmp.CodePlex.com.   Setting elevated trust A number of new features in Silverlight 4 require more permission, to gain access to the local file system for example. The elevated trust feature is only in available when running outside the browser. To enable elevated trust right click the Silverlight project and go to the project properties. Check the “Enable running application out of the…