Mango Sample: Lock and Run

When a user is idle, their screen locks and your Windows Phone application is suspended. This might be undesired, like for:  a timer, certain games, and driving directions. We have two properties to consider: The UserIdleDetectionMode property The ApplicationIdleDetectionMode property Read this from MSDN:  For the best user experience in applications that target Windows Phone…

0

Mango Online Workshop (Next Week) – Databases

In this live session I will be stepping through the process to add a database your Windows Phone applications. In fact, I will be discussing the three core techniques I wrote about in these articles: Using Code-First Using SQL Metal Using SQL Toolbox This session will be live, so you can watch me implement the…

0

Mango Sample: Data Validation

Whoa! I am getting a lot of questions on data validation. This warrants an article. Of course, we have many choices. Some are prescriptive, some are simple, and some are just not reliable. For now, I will just limit data entry to valid numbers. That doesn’t mean Char.IsNumeric. Commas and periods are valid. I also…

0

Mango Sample: External Data

External Data? Sure; data doesn’t have to be local. Like, some applications are multi-targeted. They allow users to log in on their phone, desktop, tablet, Xbox, work PC, and even fringe technologies like Droid, IPhone, and IPad. These apps probably persist user info and system data in central stores. And in most cases, they are…

0

Mango Sample: OAuth2 & Live Id

Some Windows Phone applications will need to identify the user. Most Windows Phone users have a Windows Live ID. So, leverage that Windows Live ID. How? Use OAuth2. In June 2011, the Windows Live Developer platform added OAuth2 to seamlessly access Live Id, Hotmail, Calendars SkyDrive, and other Windows Live Assets. There’s a showcase site…

0

Mango Sample: Detect Theme

Writing Windows Phone applications is tricky when users switch between the light and dark phone themes. The light theme is a white background, the dark is black. If your images are white on black, users in the light theme will think your application looks like a tinker toy. Even worse, if your images are white…

0

Mango Sample: Async Work

There are lots of things that take a long time – a politician’s apology, dance recitals, and sometimes C# operations. if you don’t want your UI to freeze during these operations, it is important to make them asynchronous. Option 1: The Event Pattern One of the most common approaches is to create a void method…

0

Mango Sample: XML Data

Building Windows Phone applications, you have options for data. Sometimes you might want to use XML files. Warning: using XML files is like serialized Isolated Storage data – you need to load the entire document into memory to filter it. But, what if your data is already XML? You might want to reuse your assets….

0

Mango Samples: SQL Toolbox

In recent posts I discussed two ways to add a local database to your Windows Phone applications.  The first was code-first. This decorates classes and creates the database programmatically. The second was SQL Metal. This command-line tool generates the classes for data access. In this post, we will discuss OPTION 3. I want to show…

0

Mango Sample: Exit Application

In a WPF application you say App.Exit() and your application terminates. It’s not so simple in Windows Phone. Since there is no Exit() method – it’s hard to know what to do. I’ll assumption there are valid reasons to exit your application. One example might be too many login attempts. You might have your own…

0