Windows Phone 7 development

Posts tagged ‘Windows Phone 7’

Changing namespaces in WP7 project

It seems that VS 2010 screws the project properties when namespaces are changed.

I posted it on SO.

And the solution is:

Check the “Startup Object” in the project properties page. The sometimes requires manually being set/corrected when the namespace of the app is changed.

Thx Matt ūüėČ

How to play music across pages.

Silverlight for Windows Phone 7 is based on the page  navigation system. Key point is the lifetime of pages Рeach page is deleted while you navigate to another. To have an object(singleton f.e.) during the whole application life it could be placed in App class (App.xaml.cs file). MediaElement is definitely an object that should be one (there must be only one music player). The best and simple solution is place the MediaElement in XAML(it needs to be a part of visual tree), I have used application resources:

<!--Application Resources-->
   <MediaElement x:Name="mediaPlayer" Source="/Sound/horrorSong.mp3" AutoPlay="False"  />

Then you can get it from any page:

MediaElement player = null; // get the media element from App resources
if (App.Current.Resources.Contains("mediaPlayer"))
   player = App.Current.Resources["mediaPlayer"] as MediaElement;
if (player != null)

MediaElement can’t play the music while Zune is connect, it is good to prompt the user about it.

if (NetworkInterface.GetIsNetworkAvailable())
   if (NetworkInterface.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
      zuneTextBlock.Visibility = System.Windows.Visibility.Visible;
zuneTextBlock.Visibility = System.Windows.Visibility.Collapsed;

This code does not guarantee if Zune is on (User sill can have the plugged phone) but is very likely that Zune is running(Zune starts while you connect the phone).

WP7 constants

I have tried to gather some important ones. I will update this post when I spot something new ūüôā


  1. 3 – devices can be unlocked by one developer(one live ID)
  2. 3 – apps can be deployed by DearmSpark developer per one phone
  3. 5 – free apps per account (next one is 19.99$)
  4. 5 – seconds after launch the app must show something to the user(loading screen f.e.).
  5. 10 – apps can be deployed by developer(paid fee) per one phone
  6. 15 – push notification channels per device
  7. 20 MB – The maximum size of the OTA (over the air) installation file for the application.
  8. 30 – frames per seconds XNA updates the screen.
  9. 60 – frames per second Silverlight updates the screen
  10. 62 x 62 – icon size(PNG)
  11. 90 MB – memory usage for devices with 256 MB ( limit can go up for devices with more than 256MB)
  12. 99  x 99 РSmall mobile app tile (PNG)
  13. 173 x 173 – tile size(PNG)
  14. 200 x 200 – Large PC app tile(PNG)
  15. 225 MB – The maximum size of the XAP package file.
  16. 480 x 800 – screenshoot of an app.
  17. 1000 x 800 – Panaroama background for marketplace – not 1440 (PNG)


  1. 0.99$ – mimimum price of an app
  2. 99$ – registration fee
  3. 200$ – payout threshold
  4. 499.99$ – maximum price of an app

The collection time of payment

  1. 15 to 30 days for credit card billing
  2. 90 to 120 days for mobile operator billing

What does not WP7 have.

WP7 missing

  1. Copy and paste text.
  2. Preview of back button stack.
  3. Socekts.
  4. Battery api.
  5. Camera – movie api.
  6. Silverlight integration with XNA.
  7. Exposed MAC address of WIFI.
  8. Tile tap and hold option to unintall the app.

There are rumors that Copy and paste will be fixed on February. Will see.

WP7 Serialization Comparison

Binary serialization vs Json.


If you can choose between Json and XML – go for Json. Average is 4 times smaller then xml.

Sync Framework 4.0 CTP for WP7

The preview of Sync Framework.


What Grills Faster

A competition… and viral marketing ūüôā

%d bloggers like this: