Thursday, October 13, 2011

Visual Studio Extensions worth checking out...

Productivity Power Tools
Many Features. Best: Tab and Pin your Code files. Close all but pinned.

VS Commands 2010
Many Features. Best: Xaml Bindings and resource highlights

Xaml Styler
Great for formatting xaml.

Team Foundation Server Power Tools August 2011
Obviously only if you use TFS for your source control. Now with Rollback feature only previously available from the command line.

Code Maid
Many Features. Best: Cool Build progress bar with "Cancel Build" button.

Snippet Designer
For Ninja Coders who want to be super productive - craft your code snippets with this.

Portable Library Tools
One Code Library to rule them [platforms] all

Code Metrics Viewer
View Code metrics usually only available for VS Ultimate users.

[Update 03/09/2011] ...

Default Browser Switcher
Toolbar that allows 1-click switch the browser that VS uses for Web Projects.
Handy when you're developing a silverlight app with no web project attached.

Some Isolated Storage Explorers

[Update 09/09/2011]...

Visual NUnit
Nice NUnit UI test runner from inside VS. Run or Debug unit tests. Also has filters for project, namespace and fixture.

[Update 13/10/2011]

NUnit Test Application

Mobile Ready HTML5 MVC.NET

AnkhSVN - Subversion SCC Provider

Nice replacement for the VS task manager -which get wiped when the .suo file is deleted. The solution is more presistent

Windows Phone Test Project

WoVS Quick Add Reference
Add quick reference to missing assembly when class referenced in code.

I've tried to keep to those extensions that are free.
... any cool ones I've missed?

Tuesday, July 26, 2011

Daily Links 26/07/2011

Novell/Xamarin Partnership around Mono

Windows Phone Developers Get New App Hub Features: Mango app submission just one month away

WP7 Dev Tips - Error Reporting

QR code scanning on Windows Phone 7.5 using ZXlib

Xceed Ultimate ListBox for Silverlight

Showing the Onscreen Keyboard in Silverlight OOB Applications

Cross platform .NET mobile apps talk at NDC 2011

Smooth Streaming in Silverlight

Offline Silverlight Applications
Channel 9 Video
Great presentation / source code for patterns when developing offline capabilites for silverlight applications. When you consider the intrusion of tablets in the work-place, and the mobility they provide, this becomes increasingly necessary - particularly of LOB apps.

Branch by Abstraction (BBA)
An alternate "best practice" feature-based branching strategy

Speed up Visual Studio Builds

GPU.NET, a developer platform with it's own Compiler and Runtime to easily hardware-accelerate .NET solutions.

Friday, July 22, 2011

Windows Phone: 1-Click Backup and Restore of Isolated Storage Data

WP7 Development Tools ships with an Isolated Storage Tool that allows you to backup and restore files that are in the Isolated Storage – on your device, or on your phone. Problem is, it’s a command-line tool, so it’s not all that user-friendly. Here are some steps to make use of that tool and Visual Studio Toolbar Buttons to create a quick 1-click shortcut to backup and restore your data.

Step 1: Find your Application Id

You can find your Application Id in the form of a Guid in the AppManifest.xml file:



Step 2: Create a batch file to call into the IsoTool.exe

I found it handy to great one batch file for backup, and another for restore.
If you really wanted to, you could define a single batch file with % placeholders for the parameters (backup / restore / device / emulator)

So for backup, it should look something like this:

@echo off
cd "Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\"
ISETool.exe ts xd {<PASTE ProductID HERE>} %1
echo Backup Complete

… and for the restore, something like this:

@echo off
cd "Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\"
ISETool.exe rs xd {PASTE ProductID HERE} "%1\IsolatedStore"
echo Restore Complete

The above 2 files target the emulator – if you’d like to target your device, you can update “xd” to be “de”

Step 3: Add a Visual Studio External Tool Command

From the Visual Studio menu, go to Tools | External Tools. 
Click “Add” to add a new command, and it should look something like this:


I found it handy to prompt for arguments, so that I could append to the path for different backups / restores.
Do the same for the restore batch file.

Almost there – you can now backup and restore by accessing the commands from the Tools Menu in Visual Studio – but I did mention we’d add a “1-click” solution, so optionally follow step 4…

Step 4: Hook the External Tool Command to a Toolbar Button

From Visual Studio, right click the toolbar, and select “Customize”.
From the Toolbars tab, click the “New” button, and give your toolbar a name.
Then switch to the Commands Window, select the “Toolbar:” radio button, scroll to the toolbar  you just named, and click the “Add Command” button.
In the “Add Command” dialog, scroll to the “Tools” item under “Categories” on the left.
Now this is where Visual Studio gets a bit sucky – the command doesn’t have a name that makes sense. If you haven’t added any custom commands in this manner before, the names of the backup and restore external tool commands you just added should be something like “External Command 5” and 6:


Click the OK button to add a button. From there you can give it a name that makes sense:


Click the close button, and voila, you should have a toolbar with buttons that will backup and restore the data on your WP emulator / device:


Happy Coding Smile

Some other Software Development Articles…

Tuesday, July 12, 2011

Daily Links 12/07/2011

MonoCross - The Technology
Some very interesting thoughts on cross platform development, along with an open-sourced framework that practically implements it.
The Mono team has since been retrenched, but keep an eye on Xamarin (from those very same developers) for some exciting developments in the cross-platform space.

Creating WP7 promotional videos

Portable Library Tools
Single library - multiple .NET platforms

Top 8 Websites To Learn Windows Phone 7 Development

WP7 Launchers - Mango (Windows Phone 7.1)

Resources for Windows Phone Mango Developers

PinCodeKeeper WP7 app - Submitting to Marketplace

Building a detailed About page for your Windows Phone application

Silverlight Touch Library
Provides some parity with the touch API found in the windows phone silverlight framework

Wednesday, June 8, 2011

Daily Links 08/06/2011

Slide-out keyboard support on Windows Phone

WP7 Mango: Know about application lifecycle

Developers: New Screenshot Tool Now Available

Seven useful tips and tools for Windows Phone 7 developers

WP7Contrib – Bing Maps REST Service Wrappers

Elevated Trust in Silverlight 4
" Apply custom chrome;
Directly access selected directories on the file system;
Use COM Interop to open up a whole range of features, including;
Running windows applications;
Integrating with Microsoft Office products;
Access to the Windows Speech API.
Relaxed user consent on Clipboard, WebCam and Microphone access
Full Screen Keyboard support
Cross Domain network calls, without the requirement for a Client Access Policy. "

Silverlight, HTML5 & Windows 8 : Where we are heading to ?

WCF Extensibility – Custom Serialization in Silverlight

making the common things you have to do in every windows phone application, like persist application settings, use tasks/choosers, log/trace, threading/asynchronous development etc. testable.

The Sterling NoSQL Database in a Mango World

Monday, June 6, 2011

Windows Phone: Capture + Resize Image using the phone camera

Sample code. It’s not tested, so let me know if there are any issues:

Basically a wrapper around CaptureCameraTask with some image resize filling.



      private void ConfirmMarkerPicture_Click(object sender, RoutedEventArgs e)
CameraTask task = new CameraTask();
task.TakePicture(CameraTask_TakenPicture, true);

private void CameraTask_TakenPicture(BitmapImage image)
_imgMarker.Source = image;

… where _imgMarker is type Image.

There are also Resize Width and Height properties which can be set prior to TakePicture call.

Happy coding Smile.

Daily Links 06/06/2011

Project Silk
"Project Silk provides guidance for building cross-browser web applications with a focus on client-side interactivity"

Project Silk Drop 10

"enables cross-platform portability of business logic and data access code, (Model + Controller), while supporting full, native and/or platform-specific presentation (Views). "

WP7 TombstoneHelper V2.0 released

Is your WP7 application ready for certification?

AgFx makes writing data-heavy Windows Phone applications child's play!

Task System in Windows Phone 7
Camera Capture Task
Email Address Chooser Task
MarketPlace Search Task
MarketPlace Hub Task
MediaPlayer Launcher
Phone Call Task
Phone Number Chooser Task
Photo Chooser Task
Search Task
SMS Compose Task
WebBrowser Task

Windows 8: HTML5 and AJAX/JavaScript == Modern UIs: HTML5, AJAX/JavaScript/jQuery

Yet Another Nail In Silverlight’s Coffin?

Windows 8 and the future of Silverlight

How to: Build a Duplex Service for a Silverlight Client

Fun and Headaches with Custom Duplex Bindings for your WCF Services

Scale-out of Silverlight HTTP polling duplex WCF service in a web farm scenario

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:

Apply the style to the ListBox – like so:


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.