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
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.