0

I get XamlParseException on HTC Mazaa. The code below works fine on Nokia Phones and Emulators. If I remove Property Mode from Applicationbar it starts working on HTC Mazaa as well. Why is Mode Property not recognized when running on HTC Mazaa?

Code:

<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar Mode="Minimized" ForegroundColor="Gray" BackgroundColor="White"  IsVisible="True" IsMenuEnabled="True" Opacity="0.9" >
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="About" Click="About_Click"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

Exception and Stacktrace below

The property Mode was not found in type ApplicationBar
 at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
   at JohnCO.MainPage.InitializeComponent()
   at JohnCO.MainPage..ctor()

If I try to do it pro-grammatically in C# like:

this.ApplicationBar.Mode = Microsoft.Phone.Shell.ApplicationBarMode.Minimized;

I get exception as :

Could not load type 'Microsoft.Phone.Shell.ApplicationBarMode' from assembly
 'Microsoft.Phone, Version=7.0.0.0, Culture=neutral, PublicKeyToken=24EEC0D8C86CDA1E'

This is a weird problem happening on on HTC Mazaa. I haven't been able to try it on any other HTC phones. Above code works fine on bunch of NOKIA phones and Emulators.

This app is being developed using latest SDK Windows Phone SDK 8.0, targeting 7.1 OS - WP7.x devices.

The HTC Mazaa I am testing on has Windows Phone 7.5 Software version

Rohit Gupta
  • 408
  • 5
  • 10

1 Answers1

0

What is the version of installed OS on the HTC Mazaa? My guess you don't have Mango update (WP7.5) installed - the property Mode was not available in WP7.0.
Anyway, HTC Mazaa was a pre-production device provided only for developers, so there is a chance it won't work with the new SDK at all. Maybe you even don't have the final build of Windows Phone 7.5 build number 7720 installed.

Martin Suchan
  • 10,600
  • 3
  • 36
  • 66
  • In Settings -> System -> About it says Model : HTC Mazaa Software : Windows Phone 7.5. So I think it has Mango Update. – Rohit Gupta Jan 15 '13 at 11:55
  • And the version number is 7.1.7720 or newer? I guess the problem is really based in the developer device, that might behave erratically. – Martin Suchan Jan 15 '13 at 12:23
  • It says OS version 7649.WM7_DevicesPlat(btsqalab).20110523-741. Firmware revision number 1600.0900.7649.0. Actually I saw a bunch of XamlParseException happening at the same location in code in production version of app, figured out by looking at the crash reports stack trace from Windows live account. – Rohit Gupta Jan 15 '13 at 14:12
  • If it says "OS version 7649", it means it's some kind of WP7.5 beta and it's possible that the property Mode is not yet implemented. I would recommend asking on XDA developers, how to flash your phone to latest OS: http://forum.xda-developers.com/forumdisplay.php?f=606 – Martin Suchan Jan 15 '13 at 14:39
  • ok. Thanks for your help. What I still dont understand is why would it show up 21 times in crash reports I downloaded from Windows Store? – Rohit Gupta Jan 17 '13 at 08:12