Friday, December 31, 2010

Lost manuals?

Check out this site for copies of manuals that you might have lost: http://www.retrevo.com/samples/index.html

Help for choosing a great #WindowsPhone7 device

This infographic put together by the folks at Technobolt allows you to quickly compare the important features of all the WP7 phones available, so that you can make the best choice based on your needs (Click to view it in its full glory):

I bought the Samsung focus based on its screen type (Super Amoled) and its weight and I love it!

Thursday, December 30, 2010

Interstate Road Conditions–WP7 App

BackgroundThis past week’s weather in the north-east and the impending snow that is about to hit Denver, left me wanting for a simple app that would allow me to quickly assess the conditions of the interstates that I might end up travelling. I have always used the interstate conditions pages on Weather.com (http://www.weather.com/activities/driving/interstate/). But what I wanted was the ability to quickly be able to take stock of interstate conditions in my region.

Out of this need was born the Windows Phone 7 app: Interstate Road Conditions.

It allows you to:

  • Get road conditions for the entire country or
  • Road conditions in one of the 9 regions of the country (North-east, east-central, south-east, north-central, central, south-central, north-west, west-central, south-west).

The maps support pinch to zoom and the application also provides you with direct links to Weather.com pages for the region you are viewing, allowing you to get in-depth and up to date information about road conditions.

Screen shots:

National road conditions mapNational road conditions map - zoomed inCentral road conditions mapCentral road conditions map (tomorrow)Central road conditions map - zoomed inMap in landscape modeWeather.com page in Internet Explorer (opened from a link in the app)

You can download the app (its free), using the following direct link to the application: http://social.zune.net/redirect?type=phoneApp&id=1c22d251-4b12-e011-9264-00237de2db9e

Videocast:

Wednesday, December 29, 2010

Application Version in Windows Phone 7

The typical method of retrieving application version using the code shown below doest work in Windows Phone 7 (it throws an exception).

string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();

Instead you need to use the following code:

public static string GetVersion()
{
const string VerLabel = "Version=";
string assemblyName = System.Reflection.Assembly.GetExecutingAssembly().FullName;
int startIndex = assemblyName.IndexOf(VerLabel) + VerLabel.Length;
int endIndex = assemblyName.IndexOf(',', startIndex+1);
string version = assemblyName.Substring(startIndex, endIndex - startIndex);
return version;
}

Monday, December 27, 2010

Silverlight–Binding to a collection

Typically when you need to bind a value from a collection to a UIElement property you use the format: {Binding NameOfProperty}. (eg: <TextBlock Text=”{Binding FirstName}” />).

But what do you do when you need to bind to a collection of native types (eg: List<string>).

Simple – don’t enter the binding path. So the above textblock definition becomes: <TextBlock Text=”{Binding}” />

Saturday, December 25, 2010

Using Fiddler to inspect web-traffic from WP7 Emulator

  1. Click Tools > Fiddler Options.
  2. Open the Connections tab and put a check in the Allow remote computers to connect box
  3. Close the Options dialog
  4. In the QuickExec box under the session list, type 
    prefs set fiddler.network.proxy.registrationhostname HostName
    where HostName is the name of your computer

Friday, December 24, 2010

Silverlight–Adding columns and rows dynamically

Here is some code that shows you how to add rows and columns dynamically in Silverlight/Windows Phone 7.

The code depends on a Grid called ContentPanel defined in the XAML (found by default on a WP7 page).

ContentPanel.ColumnDefinitions.Clear();
ContentPanel.RowDefinitions.Clear();
int numColumnsToAdd = 4;
int numRowsToAdd = 4;
for (int column = 0; column < numColumnsToAdd; column++)
{
ColumnDefinition cd = new ColumnDefinition();
cd.Width = new GridLength(200);
ContentPanel.ColumnDefinitions.Add(cd);
}

for (int row = 0; row < numRowsToAdd; row++)
{
RowDefinition rd = new RowDefinition();
rd.Height = new GridLength(200);
ContentPanel.RowDefinitions.Add(rd);
}
//add an image into each
for (int row = 0; row < numRowsToAdd; row++)
{
for(int col = 0; col < numColumnsToAdd; col++)
{
TextBlock txt = new TextBlock();
txt.Text = "Hello";
ContentPanel.Children.Add(txt);
Grid.SetColumn(txt, col);
Grid.SetRow(txt, row);
}
}

And here is the result:

image

Stocks 50/200 screencast

http://www.stocks50200.com/2010/12/stocks-50200-screen-cast.html

Free music for podcasts

CCMixter has free music that is licensed under CreativeCommons, so you can include it in your podcasts/screencasts/etc.

http://ccmixter.org/view/media/remix

More free music links: http://creativecommons.org/legalmusicforvideos

Stocks 50/200 on Bing

http://www.bing.com/browse?g=wp7#toc=0&categories_rbid=3&r=16

Think only your windows servers are vulnerable….

A new Apache server exploit has been found that allows hackers to insert malicious script. Read more about it at: http://techcrunch.com/2010/12/21/hackers-embed-spam-into-google-search-listings-for-unsuspecting-sites/.

It is important to remember that the platform itselft doesn’t make your server/applications more or less secure, instead it is how you setup/configure/maintain/secure your server that impacts its vulnerability.

Thursday, December 23, 2010

Stocks 50/200 V1.1 now available

Version 1.1 is now available for download. If you have already downloaded the app, you should be able to upgrade to this version for free (and in most cases automatically).

Or get it using this link: http://social.zune.net/redirect?type=phoneApp&id=5c08bdaa-f4f4-df11-9264-00237de2db9e

Version 1.1 brings charts and some additional stock details to you.

Learn more at: http://www.stocks50200.com/2010/12/stocks-50200-v11-now-available.html

StocksDetails_v2_1 StocksDetails_v2_2

StocksDetails_v2_3

Sunday, December 19, 2010

802.11 a/b/g connection considerations

Based on the XBox 360 network tuner wizard here are some things to know:

802.11a or higher has the least amount of wireless interference. (802.11a is better and can be considered as coming after 802.11b – although both were created at the same time).

802.11b does not support many of the features required by Windows Media Center (802.11b is an early extension to 802.11 standard and is not as good a technology as 802.11a)

802.11g may produce choppy or slowed TV and video (this standard incorporates the best of 802.11 a and b standards)

802.11n is the newest of the standards and consequently considered as the best of the technologies.

More Info: http://en.wikipedia.org/wiki/IEEE_802.11

Friday, December 03, 2010

DebugView doesn’t work with Asp.Net app

I like to use a lot of Debug.WriteLine calls for monitoring how my application is working (especially when I am developing a new feature that might be resource intensive).

Debug.WriteLine will correctly output data to the Output window of Visual Studio. But if you run DebugView (the SysInternals tool for capturing debug data), you will find that DebugView doesn’t capture the debug text.

What I found was that for DebugView to see the debug data, you cannot have the VisualStudio debugger attached to that process. Once I reran my app without debugging (Ctrl + F5), DebugView automatically began displaying the debug text.

Another thing to remember is that you need to enable the “Capture Global Win32” option in DebugView for it to see Asp.Net debug messages.

image

Note:

This behavior is by design according to the Visual Studio team (Only one debug listener can be enabled at any given time). See: http://connect.microsoft.com/VisualStudio/feedback/details/457063/outputdebugstring-doesnt-work-in-the-debugger-vs-2010-pro-beta-1-c

The compiler will automatically ignore all calls to methods in the Debug class if you build your solution in Release configuration. So if you are wondering why your DebugView is not seeing your debug text in production, that is probably why.