Skip to content
wpdev

.NET / C#

October 2012

You are browsing the site archives for October 2012.

Programmatically terminate a Silverlight app

2012-10-31
By: Kevin Gosse
On: October 31, 2012
Tagged: .NET, C#, Silverlight, Windows Phone 8, wpdev

Exiting programmatically as always been an issue for Silverlight applications on Windows Phone 7. A few workaround existed, from throwing an exception to referencing a XNA assembly and using the ‘Game.Exit()’ method. Windows Phone 8 brings a new API, that can be used from Silverlight applications: ‘Application.Terminate()’ Using it is really straightforward: A word of advice though: calling this method will immediately kill your app. It means that the ‘Application.Closing’ event won’t be triggered, and the contents of the ‘IsolatedStorageSettings.ApplicationSettings’ dictionary won’t be automatically saved to the isolated storage. Therefore, if needed, don’t forget to save that dictionary before calling the ‘Terminate’ method:Read More →

Programmatically change the lock screen picture

2012-10-30
By: Kevin Gosse
On: October 30, 2012
Tagged: .NET, C#, Silverlight, Windows Phone 8, wpdev

Windows Phone 8 introduces a new API to allow apps to change the background picture displayed on the lock screen. The displayed picture can be picked from the application’s resources or from the isolated storage. To use this feature, you need first to declare it in the application’s manifest. Just add the following extension in the “Extensions” node: If you don’t already have an “Extensions” node in the manifest, you’ll have to add it at the same level as the “Capabilities” and “Tasks” nodes: Once the manifest is updated, there’s one remaining step before being able to change the wallpaper: the application must first askRead More →

Recent Posts

  • Uncovering a bug in Attribute.GetHashCode
  • [UWP] NavigationService with back button handler priority
  • [UWP] Bandwidth adaptive image control
  • [uwp] Animation orchestration using Caliburn.Micro coroutines
  • Should I await the last call in a method

Archives

  • March 2017 (1)
  • February 2016 (1)
  • January 2016 (1)
  • October 2015 (1)
  • September 2015 (2)
  • August 2015 (1)
  • May 2015 (1)
  • April 2015 (1)
  • March 2015 (3)
  • October 2014 (1)
  • September 2014 (1)
  • November 2013 (1)
  • August 2013 (1)
  • May 2013 (1)
  • February 2013 (1)
  • December 2012 (1)
  • October 2012 (2)
  • July 2012 (1)
  • May 2012 (1)
  • February 2012 (1)
  • January 2012 (4)

Follow me on Twitter

My Tweets

Designed using Dispatch. Powered by WordPress.