Windows Phone Emulator Locations Map Issue

The last few days I have been getting a blank screen when trying to create mock locations in the Windows Phone emulator. After searching I found I wasn’t the only one with various forum threads dedicated to the issue.

Windows Phone emulator showing a blank screen instead of the map.

 

If anyone else is suffering with this problem, a temp fix has been posted by Microsoft which worked for me.

To work around the problem by adding a Browser Emulation mode entry for XDETools.exe in the registry.
caution: The side-effects of this work-around are unknown.  (… I have only done ad-hoc tests to verify it works.)

On 64 bit Windows use:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
“XDETools.exe”=dword:00002328

on 32 bit Windows use:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
“XDETools.exe”=dword:00002328

You can either enter the values manually using the registry editor (regedit.exe) or save the content to a text file with the extension “.reg” and import the file into your registry.  ex: by double clicking on the file in the file explorer or choosing File -> Import… from the menu inside regedit.exe.

And of course, the standard cautions regarding use or the registry editor apply:
Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the “Restoring the Registry” Help topic in Regedit.exe.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. UseRegistry Editor at your own risk. For information about how to edit the registry, view the “Changing Keys and Values” Help topic in Registry Editor (Regedit.exe) or the “Add and Delete Information in the Registry”.

Facebook Twitter Linkedin Email Stumbleupon Delicious Digg

C# Quick LINQ example

Recently I’ve been working with LINQ so I thought i’d do a quick post to share the two basic LINQ approaches.

First up is an example of a query that returns a collection of objects. In this case they are RouteItem objects.

 

// The LINQ Query
var routesInDB = from RouteItem route in DB.routeItems select route;

// Populate a ObservableCollection with the query results.
routeItems = new ObservableCollection<RouteItem>(routesInDB);

 

The second example is for when you want to get one item from a query similar to “SELECT TOP 1″ or  “SELECT … Limit 1″ in SQL.

 

 // The LINQ Query
IQueryable<setting> cityQuery = from c in DB.setting where c.ID == 1 select c;

// populate the setting object with the query result.
setting sett = cityQuery.FirstOrDefault();

 

The example above shows the returning of a single setting object instead of a collection.

The final example shows how to get the number of results. This may be useful if you wanted to see if an item was already present in the collection.

 

// The LINQ Query
var query = from c in routeItems where c.routeName == "home" select c;

// get the size of the returned result set.
int size = new ObservableCollection<RouteItem>(query).Count;

 

This example shows a query to count how many RouteItems have the name “home”. We place the result into an int variable.

 

Facebook Twitter Linkedin Email Stumbleupon Delicious Digg

The Cookie Monster

I’m sure you have heard of the new EU directive that dictates that all website that wish to use cookies must inform the user. If you haven’t, here is an article from the BBC explaining the situation.

 

Cookies

Source: Glenn Fleishman

 

My first reaction to seeing banners and messages on websites warning me of their cookie based intentions was that of madness. However after spending some time reading the Directive (DIRECTIVE 2009/136/E), I realised that it’s rather a sensible idea.

No 66 of the Directive clearly states:

“…It is therefore of paramount importance that users be provided with clear and comprehensive information when engaging in any activity which could result in such storage or gaining of access.”

All that states is that the user should be made aware when you plan on using cookies. This is good to avoid the evil usage of cookies but cookies are vital for functionality such as logins.

The directive covers this by later stating:

“…Exceptions to the obligation to provide information and offer the right to refuse should be limited to those situations where the technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user.”

I’m no Law expert but what I understand that to say is that if the cookies are necessary to provide functionality the user requests, i.e. a member’s area then your exempt from providing warning. Not so bad after all.

Facebook Twitter Linkedin Email Stumbleupon Delicious Digg