How to change the startup page on a WP7 application

Sometimes you may need to change the startup page of Windows Phone application. By default it will be pointing to MainPage.xaml. You can modify the WMAppManifest.xml to change the default page. In the WMAppManifest.xml you will find the following.(You can get the WMAppManifest.xml by expanding the properties node in the Project Explorer window.) Happy Programming

How to handle hardware back button in Windows Phone

If you want to display an exit confirmation from your Windows Phone app, if user press the hardware back button, here is the code snippet. (It is not a recommended practice, as per Windows Phone market place certification requirements, if user pressing the back button from the application’s first page, application should exit) It willRead More

How to generate and read QR code in asp.net

QR code (abbreviated from Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional barcode) first designed for the automotive industry in Japan; a barcode is an optically machine-readable label that is attached to an item and that records information related to that item: The information encoded by a QR codeRead More

Unit Testing Windows Phone Applications

Recently Microsoft released Update 2 for Visual Studio 2012. If you installed the Update 2, you will get a new project template, under Windows Phone, Windows Phone Unit Test App. This will help you to create unit test project for Windows Phone 8 applications. Once you create the project, necessary references will be added toRead More

How to use existing Database in Windows Phone

Normally in Windows Phone apps, we used to create Database in the Application Launch event, like the following And if there is any master tables you can write code to insert after database creation, like this. This approach is not feasible if you have lot of data, for example a Dictionary database. In such scenariosRead More

How to prevent automatic screen lock in WP7

If you are developing some travel applications or fitness applications, you may want to disable automatic screen locking feature of Windows Phone. You can disable this using UserIdleDetectionMode property of PhoneApplicationService.Current class. You can find more details about Idle Detection for Windows Phone and best practices here