Monday, 20 June 2011

WP7 Mango Phones leaked out used in Italy

According to some reports, some people have got their hands on the WP7 Mango developer phones a bit earlier than anticipated according to the Dude WIMU application which shows that 67 phones run “other versions” of the OS out of the 14,595, and as a WP7 developer, its most probably from the user agent taken from the phone and logged into their application when they made the HTTP request notably the 7.10.7605 build.

See the below snippet: -

WMPU today dug up a couple of instances of Mango running on current handsets, first off they picked up on Alessandro Teglia @alead, Community Program Manager for CEE and Italy Microsoft, tweeting about using Mango features on his HTC Mozart. and continues to do so.

alead_mango_tweets_thumb

alead_bingmusicsearch_thumb

There is also a video associated with this also.

This will cause a slight uproar on when they are actually releasing the WP7 Mango phone, as already developers have their hands on it a lot sooner than most people expected. If they keep to their word rather than guessing and throwing surprise updates and announcements, this update on the phone and new handset releases can help dampen the damage that’s already caused to the Microsoft ecosystem or will it play down again to the guessing game.

You can see on the video that the guy is showcasing mostly the Avatar, and it can interact more than the standard version 7, but I expect there to be more notable updates in the future, but obviously you can see they have made full use of the Shake gestures in WP7.

Friday, 17 June 2011

Pet List

Here are snippets of code which I found really useful when setting a drop down list element using HtmlHelpers in MVC 2 to a ViewData to be displayed on the view pages.

Dim petList As List(Of String) = New List(Of String)
petList.Add("Dog")
petList.Add("Cat")
petList.Add("Hamster")
petList.Add("Parrot")
petList.Add("Gold fish")
petList.Add("Mountain lion")
petList.Add("Elephant")

DialogScreenView.ViewData("pets") = New SelectList(petList)

or…..

Dim petList As List(Of String) = New List(Of String)

For Each petName In oPetList.PetList
    petList.Add(petName.Text)
Next

DialogScreenView.ViewData("pets") = New SelectList(petList)

DialogScreenView.ViewData("Screen") = TempData("Screen")

or….


Dim petList As New List(Of SelectListItem)()

For Each petName In oPetList.PetList
    Dim petItem As SelectListItem = New SelectListItem
    petItem.Text = petName.Text
    petItem.Value = petName.Value
    petList.Add(petItem)
Next

DialogScreenView.ViewData("pets") = petList

DialogScreenView.ViewData("Screen") = TempData("Screen")

Sunday, 5 June 2011

Pivot Controls discovered

I started working on my WP7 again, only to discover that I need some form of tabbing on it, and having investigated Pivot Controls but never use it, now would be the best time to look into in depth.

Having used the tag <controls:Pivot >….</controls:Pivot> inside the <Grid> tag, Visual Studio didn’t recognise this tag, baffled I looked a various samples, but most of them seem to point that you need the controls tag, else there was no namespace for WP7 to adhere to.

Upon discovery by accident, I realised from the Panorama demo, you must require the header reference in the XAML, the naming inside the PhoneApplicationPage: -

xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"

Finally I could get the Pivot Controls working as a result Smile

You can denote your Pivots as structured below as the barebones: -

<controls:Pivot Title="header" Name="pivot1">

    <controls:PivotItem Header="item1">

     ………..contents of PivotItem of item1 here…….

    </controls:PivotItem>

     <controls:PivotItem Header="item2">

     ………..contents of PivotItem of item2 here…….

     </controls:PivotItem>

     <controls:PivotItem Header="item2">

      ………..contents of PivotItem of item3 here…….

      </controls:PivotItem>

</controls:Pivot>

Having seen the way Pivots are structured, they seem very simple to code, and for effective as a result, and makes your application less cluttered and more ordered in its layout.