Saturday, May 28, 2011

Windows Phone: Detecting Internet Connection

There are a few posts out there that explain using the Silverlight API to detect networks and connections. Some simple, and some a little more complete.
None of them really suited what I needed, which was a simple class that I could bind a UI element to, that would reflect the internet connectivity.

So I spent a few minutes writing a class of my own, using the knowledge gained from the articles above:
1) Must have a property that fired a property changed event: IsConnectedToInternet
2) This property must be updated on the UI thread, so as not to cause cross thread access error
3) Connection status needed to be polled, in order for property to be updated.
4) Singleton Pattern for ease of use.

Here’s the code if anyone’s interested:

Daily Links 28/05/2011

Developer News: Beta Mango Tools Available Today
downlaod link

Augmented Mango - SLARToolkit for Windows Phone

Zune Detection and Network Awareness

A few tips for working with XAML inside of Visual Studio 2010.

User Experience Design Guidelines for Windows Phone

WP7 Barcode Reading

WP7: Searching your contacts

How to: Improve the Responsiveness of Your Application Using the Windows Phone Profiler

What’s New in Windows Phone Developer Tools 7.1 Beta?

Windows Phone 7 Mango - Silverlight and XNA integration

Monitor network connectivity in WP7 apps

Windows Phone 7 Development: How to change the Target Phone Version back to v7.0 from v7.1

EF 4.1 Validation

NOW AVAILABLE: New Windows Azure Platform Pricing Calculator

Tuesday, May 24, 2011

Silverlight–Disable ListBox Selection

After some searching, the following seems to be the simplest solution:
Disable Selection of a ListBoxItem with this style:
Style

Apply the style to the ListBox – like so:

Style1

Monday, May 23, 2011

Daily Links 23/05/2011

Creating a Windows Phone 7 Trial Application: Adding Buy Now Functionality

Simulating tombstone (suspended state) on Windows Phone 7 emulator

How to get the UniqueID of a Windows Phone device using C#

Offline Microsoft Silverlight Applications

Encouraging Windows Phone Marketplace Reviews

Things to consider before submitting your WP7 App

How to Publish Your AppMakr App into the Windows Phone Marketplace

WP7: Extending the ListBox Control

Silverlight Augmented Reality Toolkit

Game Changing Features in the Silverlight 5 Beta (Part 2)

TileSlider Control for WP7 (OpenSource)

NOW AVAILABLE: Windows Azure Toolkit for Windows Phone 7 v1.2

Consider this when downloading large files on Windows Phone 7

New countries supported by Mango Windows Phone Update

Debugging Windows Phone 7 device network access with just a laptop

Creating a Windows Phone 7 Trial Application: Advanced Buy Now Implementation

EF Power Tools CTP1 are Great for Code First

Using IIS Express to Secure Silverlight and WCF Applications

Za Developers - getting a WP7 device

I've been developing a WP7 application since the tools were released, and with the news that the marketplace is coming to South Africa, I thought it was time to get a device.
The best contract that I could find was a deal from 8ta:
R230 p/m
HTC Mozart (imo the best WP7 device currently available from a network)
90 mins any network
230 mins 8ta and landlines
25 MB Data

Unfortunately my current contract was only up for cancellation in October, and I really don't have that much patience, so I wondered over to expansys and bought a LG Optimus E900 for just under R3000 - I've seen it priced for as low as R2300 (the other WP7 devices were selling for just over 6G's)
The above mentioned 8ta contract can also be bought without a device with R2800 gift voucher, so it was a no-brainer.

I don't think the LG is available from a local network, but if you're willing to ignore the plain TFT screen, it has great features like 16Gig storage and 1500Ma battery.