Archive | Windows Phone RSS feed for this section

Limitations in number of items in the ApplicationBar

29 Jun

During a Windows Phone 7 course a few weeks ago I was asked about limitations in the ApplicationBar for Windows Phone 7 applications. I mentioned my thoughts on the overall design of the ApplicationBar – e.g. the missing possibilities of sharing an ApplicationBar between pages (there are some workarounds!).

The student asked about any limitations in the number of items – to be honest I did not know the precise answer. I quickly discovered that the limitation is 4 items. If you try to add more items then 4 items you will get a warning in design time and XamlParseException at runtime (inner exceptions is “Too many items in list”).

by xamlgeek 
@xamlgeek

Custom Title in a Windows Phone Panorama Control

29 Jun

The Panorama control is widely used in Windows Phone 7 applications. It often bring some wow-effect to the applications and can provide an easy way to navigate through some content.

It is easy to use the Panorama control and one of the default features is the title of the control. It is set using the Title property of the control.

2011-06-30_001415

In some cases it is necessary to build a richer title. Using TitleTemplate and a DataTemplate it is possible to build a custom title for the Panorama control.

In the sample below I have added a logo to the Title.

2011-06-30_001944

And here is my custom Title in my Panorama control.

2011-06-30_002157

You can download the sample here.

by xamlgeek 
@xamlgeek

Slides from my WP7 talk at MOW2011

15 Apr

Today I did two talks about Windows Phone 7 at MOW2011 in Billund, Denmark.

First talk was a general talk about Windows Phone 7 and how you begin Windows Phone 7 app development.

Slides | Demo

Second talk was a bit more technical and was about styling, notifications and localization in Windows Phone 7.

Slides | Demo

Hope you enjoyed it :)

by xamlgeek
@thomasmartinsen

UriMapping for WP7

15 Dec

UriMapping for Silverlight is pretty straight forward and if you use the Silverlight Navigation template you get it all from the template. WP7 contains many of the same features – it’s just not that obvious.

By default a WP7 app navigate using a PhoneApplicationFrame. PhoneApplicationFrame inherits from Frame – the control used in Silverlight. The PhoneApplicationFrame control is exposed as a property named RootFrame in App.xaml.cs.

To enable UriMapping in WP7 from the code you need to follow a few simple steps:

  1. Create a new method (in App.xaml.cs) that will set the UriMappings you need. In the method you need to make a new instance of UriMapper and for each mapping you wish to create you need to instantiate a new UriMapping specifying the Uri and MappedUri.
  2. Bind the mappings with the UriMapper instance and set RootFrame.UriMapper to the UriMapper instance.
  3. Call the method right after the RootFrame have been instantiated – typically in InitializePhoneApplication.
  4. Modify the existing start page in WMAppManifest.xml to make it fit your mappings.

In the sample below I have added two mappings; a default mapping and a mapping for a detailsview.

2010-12-15_152217

To use your mappings simply call your pages using a relative Uri:

2010-12-15_153430

You can download a demo here.

by xamlgeek
@thomasmartinsen

WP7 – fup eller fakta #1

4 Dec

Dette er en post i en serie (http://bit.ly/wp7fupfakta), hvor jeg ser på nogle af de rygter der verserer om Windows Phone 7 og Microsoft har fået lov til at kommentere på rygtet.

Windows Phone 7 rygte #1

Det er kun muligt at aktivere en Windows Phone 7 telefon med et dansk Live Id

For at aktivere en række services på Windows Phone 7 kræver det at du har et Live Id. Alle kan oprette et Live Id gratis på http://signup.live.com. Live Id’et bliver blandt anvendt til at identificere dig og dine køb således at du på et senere tidspunkt kan downloade apps du tidligere har købt. Det er dog ikke nødvendigt for at anvende telefonen at du skal have aktiveret denne med et Live-ID

Live Id’et bliver også anvendt til at hente de kontaktpersoner du har tilknyttet til Live Id’et. Det er muligt at tilknytte mere end ét Live Id til telefonen og dermed også tilknytte kontaktpersoner fra flere forskellige Live Id’s. Som supplement til et Live Id kan Outlook, Facebook, Google Mail m.fl. anvendes til hente kontaktpersoner.

Selvom det er muligt at tilknytte en Facebook konto til telefonen, skal den altid først aktiveres med et Live Id. Om Live Id’et er dansk eller amerikansk er ikke af betydning for at aktivere telefonen – det er muligt at aktivere en Windows Phone 7 telefon med et dansk Live Id.

Det skal dog bemærkes, at den markedsplads som du får til rådighed afgøres ud fra det Live Id som du har aktiveret telefonen med. Adgang til Windows Phone 7’s markedsplads er endnu ikke åbnet i Danmark og har du derfor aktiveret din telefon med et dansk Live Id, har du ikke mulighed for at benytte dig af markedspladsen – endnu. Har du aktiveret telefonen med et amerikansk Live Id vil du få adgang til den internationale markedsplads.

Har du i dag et dansk Live Id og vil du gerne have adgang til den internationale markedsplads, kan du oprette et nyt amerikansk Live Id (http://signup.live.com) og bruge det til at aktivere telefonen. Herefter kan du tilknytte dit danske Live Id og dermed få kontaktpersoner mv. fra dit normale Live Id.

by xamlgeek
@thomasmartinsen

Windows Phone 7 – fup eller fakta

26 Nov

Windows Phone 7 er endelig kommet på markedet og telefonerne er lige så langsomt begyndt at komme i handlen. Der er stadig en masse features vi som udviklere ønsker os og der er sikkert også nogle features som forbrugerne ønsker sig – der skal jo være noget at komme med i en fremtidig version.

Der går en del rygter om Windows Phone 7 – nogle er sande andre er usande. Over den kommende periode vil jeg skrive en række posts, hvor jeg ser på nogle af rygterne. Udover at give min egen og et par andre udviklers menig tilkende, har jeg aftalt med Microsoft, at de i videst mulige omfang, vil kommentere på de enkelte rygter.

Alle posts bliver skrevet så neutralt og objektivt som muligt, men I skal vide, at jeg er Microsoft MVP og lever af Microsofts teknologier.

by xamlgeek
@thomasmartinsen

150+ members in WPDEV

23 Nov

Just a few months ago we started Windows Phone 7 Developers in Denmark (aka WPDEV) and today we passed 150 members – YEAH :)

During the past month we did three 2-days WP7 code camps around Denmark with more then 100 participants. We have received a lot of positive feedback – thanks! As mentioned in a previous post you can download the full sourcecode, slides and hands-on labs from http://wp7codecamp2010.codeplex.com/.

Our next event is on 15th December 2010. The event is a deep dive into the world of push notifications (fantastic!):

Understand Push Notifications on Windows Phone 7
http://www.eventbrite.com/event/1003819451

by xamlgeek
@thomasmartinsen

Danmarksmesterskabet i mobile applikationer

5 Nov

Den 6. december 2010 afholder Mobile Monday i København konkurrencen AppCircus, hvor Danmarks sejeste mobilapplikation skal findes og kåres. Den rette vinder har muligheden for at komme med til den globale AppCircus konkurrence i Barcelona.

Mobile Monday har nu åbnet for tilmelding til konkurrencen i København og såvel privat personer som virksomheder kan tilmelde sig. Det er gratis og fristen er den 21. november 2010. Selve konkurrencen finder sted mandag den 6. december kl. 16:00 til 19:00 i kontorhotellet Ordnung.nu, Lersø Park alle 107, 2100 København Ø.

Læs mere på http://www.mobilemonday.dk/

by xamlgeek
@thomasmartinsen

Windows Phone 7 Toolkit November release

3 Nov

Second release of the Windows Phone 7 Toolkit (november release) is now ready for download at codeplex – http://silverlight.codeplex.com.

The new version contains some new components:

  • AutoCompleteBox
  • ListPicker
  • LongListSelector
  • Page Transitions (finally!)

The existing components:

  • GestureService/GestureListener
  • ContextMenu
  • DatePicker
  • TimePicker
  • ToggleSwitch
  • WrapPanel

As always you can download the full source code under Microsoft Public License and sample applications for all controls in the toolkit.

by xamlgeek 
twitter.com/thomasmartinsen

Wrapping up after WP7 code camp tour 2010

2 Nov

During October 2010 the Danish Windows Phone usergroup (wpdev.dk) traveled from city to city in Denmark to talk about Windows Phone 7 developement. All-in-all we had more then 100 developers visit us.

Thank you to all of you for being part of the code camp tour – and thanks to all members of the core group. Thank you Trifork and hedal:kruse:brohus for letting us use your offices and also big thank you to Microsoft Denmark for sponsoring pizza and cola to all events.

You will be able to download all slides, handson labs and code samples from http://wp7codecamp2010.codeplex.com.

CodeCamp 301010 (20) WP_000000 WP_000006
WP_000022 WP_000026 Code Camp 301010 (11)
WP_000003 Code Camp 301010 (6) WP_000055

by xamlgeek 
twitter.com/thomasmartinsen

Follow

Get every new post delivered to your Inbox.