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 to [...]
Posts Categorized: Windows Phone
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 scenarios [...]
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
How to detect if the application is in design mode in WP7
Sometimes you may require to detect whether the Application is in Design mode or not in the view model, otherwise if you are creating instance of DataContext or using Application object etc, XAML designer will not display the UI. You can detect the design mode in WP7 using DesignerProperties.IsInDesignTool property, if it is true, you [...]
How to determine light or dark theme in WP7
WP7 supports light theme and dark theme, you should consider the theme, while developing the apps, otherwise there is chance that you may fail the certification. You can query the resource PhoneLightThemeVisibility, which will be true, if Phone theme is light to determine the theme. Or you can use XAML Databinding also to display / [...]
How to display Indic languages in Windows Phone 7
By default Windows Phone 7 doesn’t support indic languages like Malayalam, Hindi, Tamil etc. Yesterday I discussed this issue with some WP7 experts and found that we can do this by rendering with our font. I did some further investigation and found that we can provide the font as part of our application, and using [...]