WP7 Silverlight Gotcha: Setting the Source on a MediaElement will stop background music playback

Applies To: Silverlight (the restriction applies to XNA, but the MediaElement is only Silverlight) Quick Bits Simply setting the Source of a MediaElement to a valid source will stop any current background playback, causing you to fail Marketplace certification, according to section 6.5.1 from the certification guide. The Fine Print From the certification guide: 6.5.1  Initial Launch…

1

WP7 Dev Tip: Detecting whether or not the user is playing music in the background

Applies To: Silverlight & XNA Quick Bits Microsoft.Xna.Framework.Media.MediaPlayer.GameHasControl The Setup Your app does some sort of music playing that doesn’t make sense to blend into any already playing background music (for example, you’re going to stream your own music) or you simply want to show a video. Why You Care? If you just start playing music…

2

WP7 Gotcha: Showing a Launcher or Chooser will crash while Navigating

Applies To: Silverlight & XNA (anyone using Launchers / Choosers) Quick Bits Always wrap [some launcher object].Show() with a try/catch block which catches InvalidOperationException, since running Show() while navigating (for example, if the user clicks your button multiple times quickly in succession) will cause this Exception to be thrown. The Setup You have a button…

2

WP7 Marketplace Tip #2.5 – Free App + Updates Policy Clarified (finally)

It’s been a while, and there’s been a lot of confusion surrounding this topic of “5 free apps”, so here’s the final low down: Unlimited number of paid applications This includes updates to said applications A paid application cannot be made free  5 submissions of free applications Unlimited updates to accepted free apps WARNING: failed submission of free…

7

Silverlight Performance at TechEd Europe

If you happen to be down at TechEd Europe this week, don’t forget to come by the Windows Phone 7 and Silverlight booths (they’re opposite each other in the Technical Learning Centre) and say hello. You’ll get to play with some phones from HTC and interact directly with both teams – don’t miss out! Something…

0

WP7 Marketplace Tip #2: 5 Free Apps == 5 Free App *Submissions*

Updated Policy! Sure, the App Hub site says: Submit up to five free apps to Windows Phone Marketplace, additional submissions are $19.99 USD But here’s what it really means: Submit up to five free apps (including updates) to the Windows Phone Marketplace, additional submissions (of apps or updates) are $19.99USD FTFY Seriously The policy is simple,…

3

Silverlight for Windows Phone 7 Performance Session at PDC!

  It’s that time of year again – PDC 2010 kicks of tomorrow! Join the Silverlight Performance Team as we take you through the high level analysis of common performance issues that apps commonly run into. I’ll be giving a live session titled “Optimizing Performance for Silverlight WP7 Apps” at 3:15pm (PDT)  on day 1 (28…

0

Silverlight: Why do I get 0x8000ffff when using WriteableBitmap on an Element

I’m working on a WP7 library which helps analyze your VisualTree and to provide a visual aid, I take WriteableBitmap snaps of the elements. Unfortunately I (seemingly) randomly encounter the following exception:   A first chance exception of type ‘System.Exception’ occurred in System.Windows.dll When digging into the exception you may find that the error is actually…

2

WP7 Marketplace Tip #1: Submit one app with multiple locales

… as opposed to multiple apps, each with a different locale. Why? If these are free apps, then each language will count towards your free app quota (you get 5 free apps that you don’t need to pay certification costs for) Regardless of price, each app will need to go through independent certification (which will…

0