You are browsing the archive for Windows Phone 7.

More Complete WP7 Mango Database Update Walkthrough

September 15, 2011 in Silverlight, Uncategorized, Windows Phone 7

The MSDN documentation gives a walkthrough of how to update a local database application on the Windows Phone over time. The documentation gives quite a bit of detail but seems to miss a likely scenario. So let’s investigate the process step-by-step.

Initial Version

We are creating the first version of our application and decide that we need a User database table with the following columns: Name (primary key), LastAccessedDate

So we create a User class as follows:

[Table]
public class User : INotifyPropertyChanged, INotifyPropertyChanging
{
  private string name;
  private DateTime? lastAccessed;

  [Column(IsPrimaryKey = true, CanBeNull = false, AutoSync = AutoSync.OnInsert)]
  public string Name
  {
  get { return name; }
  set
    {
      NotifyPropertyChanging("Name");
      name = value;
      NotifyPropertyChanged("Name");
    }
  }

  [Column]
  public DateTime? LastAccessed
  {
    get { return lastAccessed; }
    set
    {
      NotifyPropertyChanging("LastAccessed");
      lastAccessed = value;
      NotifyPropertyChanged("LastAccessed");
    }
  }

  // Version column aids update performance.
  [Column(IsVersion = true)]
  private Binary version;

  // INotifyPropertyChanged Members
  // INotifyPropertyChanging Members
}

Read the rest of this entry →

Windows Phone 7 Development Links

November 13, 2010 in Windows Phone 7

Microsoft Tools

App Hub – http://developer.windowsphone.com (http://create.msdn.com/en-US/)

  • Visual Studio 2010 Express
  • Expression Blend for Windows Phone
  • Windows Phone Emulator
  • XNA Game Studio 4.0
  • Silverlight/.NET Framework

Code Samples (Silverlight) – http://create.msdn.com/en-US/education/catalog/article/wp7_code_samples

Code Samples (XNA) – http://create.msdn.com/en-US/education/catalog/?contenttype=4&devarea=0&platform=0&sort=1

Application Bar Icons for Windows Phone 7

  • 32-bit computers – C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Icons
  • 64-bit computers – C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Icons  

Theme XAML files

  • 32-bit computers – C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Design
  • 64-bit computers – C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.0\Design

Windows Phone Developer Registration

Application Deployment

Capability Detection

GUI – http://mobileworld.appamundi.com/blogs/petevickers/archive/2010/11/02/gui-interface-for-capabilitydetection-exe.aspx

Silverlight Performance Analysis tool – Coming Soon (announced at PDC10) – http://www.shazaml.com/archives/silverlight-performance-analysis-tool-coming-soon

 

Documentation

Fundamental Concepts – http://msdn.microsoft.com/en-us/library/ff967549(v=VS.92).aspx

Windows Phone Design System – Codename Metro  – http://go.microsoft.com/fwlink/?LinkID=189338

Design Templates for Windows Phone 7 – http://go.microsoft.com/fwlink/?LinkId=196225

UI Design and Interaction Guide for Windows Phone 7 – http://go.microsoft.com/fwlink/?LinkID=183218

Summary – http://www.shazaml.com/archives/summary-ui-design-interaction-guide-for-windows-phone-7

Windows Phone 7 Application Certification Requirements – http://go.microsoft.com/?linkid=9730558

Summary – http://www.shazaml.com/archives/summary-of-windows-phone-7-application-certification-requirements

Top 10 Tips for a Successful Marketplace Certification – http://blogs.msdn.com/b/jodonnell/archive/2010/10/06/windows-phone-7-top-10-tips-for-a-successful-marketplace-certification.aspx

WP7 Training Course – http://msdn.microsoft.com/en-us/wp7trainingcourse.aspx

Fiddler and the Windows Phone 7 Emulator – http://blogs.msdn.com/b/fiddler/archive/2010/10/15/fiddler-and-the-windows-phone-emulator.aspx

 

 

Presentations

16 MIX10 Videos – http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/03/17/videos-of-mix10-windows-phone-sessions.aspx

Silverlight and Windows Phone 7 Performance Tips (SilverlightTV) – http://channel9.msdn.com/Shows/SilverlightTV/SIlverlight-TV-47-Silverlight-and-Windows-Phone-7-Performance-Tips

PDC10 – http://player.microsoftpdc.com/

Silverlight Video Resources – http://www.silverlight.net/learn/videos/windows-phone/

 

Open Source  & 3rd Party Tools

Open Source

Silverlight Toolkit (WP7) – http://silverlight.codeplex.com/releases/view/55034

 

Json.NET – http://json.codeplex.com/

High performance ProgressBar – http://www.jeff.wilcox.name/2010/08/performanceprogressbar/

Sterling Isolated Storage Database – http://sterling.codeplex.com/

LowProfileImageLoader – http://blogs.msdn.com/b/delay/archive/2010/09/02/keep-a-low-profile-lowprofileimageloader-helps-the-windows-phone-7-ui-thread-stay-responsive-by-loading-images-in-the-background.aspx

DeferredLoadListBox – http://blogs.msdn.com/b/delay/archive/2010/09/08/never-do-today-what-you-can-put-off-till-tomorrow-deferredloadlistbox-and-stackpanel-help-windows-phone-7-lists-scroll-smoothly-and-consistently.aspx

Windows Phone 7 Design Templates – http://wp7designtemplates.codeplex.com/

Turnstile control – http://turnstile.codeplex.com/

MVVM Light Toolkit – http://mvvmlight.codeplex.com/

Caliburn Micro – http://caliburnmicro.codeplex.com/

 

Fee

Telerik RadControls for Windows Phone – http://www.telerik.com/products/windows-phone.aspx

Perst database – http://www.mcobject.com/june30/2010

 

 

Books

Programming Windows Phone 7 (Charles Petzold) – http://www.charlespetzold.com/phone/

101 Windows Phone 7 Apps, Volume I: Developing Apps 1-50 (Adam Nathan) – pre-order

Silverlight Performance Analysis tool – Coming Soon

November 12, 2010 in Silverlight, Windows Phone 7

At PDC10 as part of the keynote, Scott Guthrie showed off the soon-to-be-released Silverlight Performance Analysis tool that would allow developers to profile their Windows Phone 7 applications and identify bottlenecks in frame rate and CPU and relate that back to specific storyboards and even Visual Tree elements.

The below screenshots were taken from the keynote video and you can see the timings at the bottom if you want to watch the video:

image

In addition to debugging on the device, you can profile the app by selecting Silverlight Performance Analysis:

perf1

The device will then be prepared for profiling:

perf2

After running the application, a graphical summary will be created with execution time on the x-axis.  It shows color-coded frame rates (green is good, red is bad) and relates that to CPU-usage and specific Storyboards:

perf3

In the above example, it appears that the first Storyboard might be leading to increased CPU usage and a degraded frame rate.  You can highlight and drill down to see details for a specific time frame (from approx 4.5 to 7.5 seconds into the profiling session):

perf4

The next screen shows CPU and GPU metrics as well as a list of warnings.  The first entry warns about 35 instances of ColorAnimation:

perf5

Scrolling down, you will see an Element Summary:

perf6

Followed by a Frames section with a CPU usage graph:

perf7

And finally the ability to drill down the Visual Tree and see problems highlighted:

perf8

This tool would be very helpful in analyzing app performance on the device.  ScottGu did not give a specific release date for this or any additional tools that might be coming.

Today I saw that there is a Silverlight Firestarter event scheduled for December 2, 2010 and wonder if the tool will be ready to release then. 

image

It would make a great time to announce it.

7 Windows Phone 7 Marketplace Complaints

November 4, 2010 in Windows Phone 7

Soon many will be experiencing the Windows Phone 7 marketplace as they download apps for their new phones.  Here is a list of 7 complaints about the marketplace:

1. Cannot Search by Keywords

When I submitted the Cousin Calculator app to the marketplace, I was able to enter keywords that would make finding the application easier:

image

But when I search for the app using one of the keywords, the application doesn’t show in the results:

image

Currently it is going to be more difficult to find some apps.

2. Cannot Search for Subgenre

Multiple genres in the marketplace have subgenres, but it is not always easy to remember which subgenre goes with each genre.  If I explore the SHOPPING subgenre under LIFESTYLE, there are currently 27 apps.  If I do a search for “shopping” I only see 6 apps:

image

3. Missing Genres or Subgenres

Compared to iTunes, the marketplace is missing some categories such as:

  • Education
  • Games
    • Arcade
    • Dice
    • Role Playing

So if I am looking for flash cards, the periodic table, or other educational tools and games where in the marketplace should I currently look?

4. Cannot Filter Results Based on Language

Browsing the apps in the marketplace, currently I see applications for languages that I don’t read. The name of the app is in a foreign language and so are the description and screen shots:

 image

 image

I should be able to specify the languages of apps that I want to see in my results.

5. Cannot Sort by Top Rated

You can sort applications by Top selling and Release date and you can see the number of stars for their rating, but you can’t sort by Top rated.

6. Sort by Release Date Doesn’t Group by Date

When browsing the marketplace, if you sort by Release date, the only way to see the release date is to click to see the app details.  It would be nice if the results showed the apps grouped by date.

7. Missing Counts when Browsing Genres

When “window shopping” in the marketplace, it would be nice to see the number of apps in each genre and subgenre.

I am hopeful that we will soon see some of these changes coming to the marketplace.

What issues do you see with the marketplace?

What things do you really like about it?

Comparing Microsoft Marketplace and Apple App Store

August 12, 2010 in Windows Phone 7

Developers are starting to create games and applications in preparation for the Windows Phone 7 launch at the end of the year. Some applications that I am creating would appear in an Education category if Marketplace had such a category.  The App Store has an Education category.  So I thought I would do a quick comparison of the categories available in each location.

Marketplace App Store
Games Games
Entertainment Entertainment
News & Weather: News News
News & Weather: Weather Weather
News & Weather: Sports Sports
Productivity: Time Management

Productivity: Money Management

Productivity: Task Management

Productivity

Finance

Social Networks Social Networking
Lifestyle: Health &Fitness

Lifestyle: Recreation

Lifestyle: Photography

Lifestyle: Shopping

Lifestyle: More

Lifestyle

Healthcare & Fitness

Photography

Maps & Search: Maps

Maps & Search: Local Search

Navigation
Travel Travel
Business Center: Inventory

Business Center: Dashboards

Business Center: Services

Business Center: CRM

Business Center: Documents

Business Center: Data Collection

Business Center: Field Service

Business Center: Finance

Business Center: Health Care

Business Center: Manufacturing

Business Center: More

Business Center: Real Estate

Business Center: Time & Expense

Business Center: Unified Comms

Business
Reference Reference
Books Books
Tools: Utilities

Tools: Developer Tools

Utilities
 Communication  
  Education
  Medical

 

At first it appeared that Marketplace was missing four more categories than it was because of its use of nested categories.  It turns out that Marketplace is more fine-grained when it comes to Business and it has a Communication category that App Store doesn’t.  But Marketplace is missing categories for Education and Medical.  I think it is a huge oversight to not have a top-level Education category in Marketplace.

Now let’s compare the Games categories between the two stores:

Marketplace App Store
Action Action
Classic  
Board Board
Card & Casino Card

Casino

Education Educational
Family & Kids Family

Kids

Music Music
Driving Racing
Strategy Strategy
Simulation Simulation
Sports Sports
Word & Puzzle Puzzle

Word

  Adventure
  Arcade
  Dice
  Role Playing
  Trivia

 

It is surprising to see that App Store has 5 more categories than Marketplace with Classic being the only category that Marketplace has that App Store doesn’t.

I suspect that as more applications are developed for (or ported to) the Windows Phone 7 that developers will be asking Microsoft to add categories to Marketplace.

Visual Studio Project Template for Caliburn.Micro WP7

August 10, 2010 in Windows Phone 7

Two days ago, Rob Eisenberg released a sample of Caliburn.Micro for Windows Phone 7.  I spent a few minutes today creating a Windows Phone 7 Caliburn.Micro project template for Visual Studio 2010 from that project.  It should help you get started more quickly on your WP7 projects.

Download and copy the Caliburn.Micro.WP7.zip file to the following directory on your computer: \Documents\Visual Studio 2010\Templates\ProjectTemplates\Silverlight for Windows Phone

Start up Visual Studio and create a new project.  You will see an option for Caliburn.Micro (WP7):

image

After the project is created, you will see the following project structure:

image

Fix the reference to Caliburn.Micro (download from CodePlex), set a breakpoint in the constructor of MainPageViewModel, and run the application.  You will see that when navigation happens to MainPage, that MainPageViewModel is created. 

Continue execution to view the app in the emulator:

image

I like Rob’s idea of doing View-first for pages and ViewModel-first for components on a Page.  I have chosen the following naming: MyPage/MyPageViewModel (pages) and MyView/MyViewModel (user controls).

WP7 UI Pattern: Pivot Views

August 4, 2010 in Windows Phone 7

image

The user is shown multiple views of the same item side by side using the Pivot control. The buttons on the Application Bar remain consistent across Pivot pages.

Example: E-mail (all, unread, urgent, flagged); Appointment (details, attendees)

(video)

WP7 UI Pattern: Layered Panorama

August 4, 2010 in Windows Phone 7

image

The user is presented with a panorama containing multiple pages of content. The first is a list that acts as a menu. Clicking on a list items takes you to another panorama with the specific content. The Application Bar is not used.

Example: AP Mobile

(video)

Summary: UI Design & Interaction Guide for Windows Phone 7

August 2, 2010 in Design, Windows Phone 7

image 

The July 2010 release of the UI Design and Interaction Guide for Windows Phone 7 is a document that all designers and developers of Windows Phone 7 applications need to become thoroughly familiar with.  It is a beautifully laid out 101-page document that discussed the phone’s capabilities, controls, and interactions.  As I read the guide, I took notes that I could refer to quickly as needed.  The result is a 10-page summary of the UI Design & Interaction Guide for Windows Phone 7.  I hope others find it useful.

MVVM with Caliburn.Micro

July 30, 2010 in Silverlight, Windows Phone 7

Silverlight, WPF, and Windows Phone 7 developers should consider using the Model-View-ViewModel (MVVM) pattern for developing their LOB applications.  One choice for MVVM is Caliburn.Micro developed by Rob Eisenberg.

 

Here is a link to the documentation topics:

  • Recipes
    • SimpleContainer

 

I know Rob has been working on some WP7 goodness that should be out soon.  Looking forward to the release.