As new articles and opinions pop up after official presentation of Windows Phone 7 I’m getting more and more excited about new OS.
- Windows Phone 7 Interface: Microsoft Has Out-Appled Apple describes new Windows Phone 7 as a new paradigm in user experience. Mostly I agree with the author, but it looks like he is too excited about data-centric UI. I believe that both data- and function-centric approaches have their followers and nobody knows to which of them applications from third developers will turn Windows Phones.
- Windows Phone 7 Series: Everything Is Different Now makes new OS even more clear. In the same time we as developers still have some very important questions waiting in the shadows, like:
But here’s a question: Will they multitask? Um, that depends on your definition of multitasking! When we asked Joe Belfiore, the guy running Windows Phone, he alluded to live tiles and feeds as some ofthe ways that third-parties will be able to “bring value to the user, even when their apps aren’t running.” Which sounds to us like a big ol’ “shnope,” but we’ll see more next month at Microsoft’s developer event MIX.
And another post from WMPoweuser:
On Mobile World Congress that take place in Barcelona Microsoft presented new generation of Windows Mobile. Here are some of reviews that reveal WM 7:
There is a great tip on this in Alex Yakhnin blog.
Yesterday I was surfing the web looking for information regarding Windows Mobile 7. Although not much details are available by this time I created a brief summary of rumors, leaks and announcements.
Official Announce and Preview
Mobile World Congress in Feb 2010 at Barcelona.
MIX in Mar 2010 at Las Vegas.
Editions
Business edition (expected in Q4 2010) is designed to give OEMs more control over customization.
Media edition (expected in Q1 2011) will be targeting the main consumer of cell phone devices, this version will come loaded with full support for Silverlight, Xbox Live, Mediaroom, Zune Music and Social media sites interfaces.
First Expected Phones
From LG in Sept 2010.
From HTC in Oct 2010.
Updates in Features
As reported Windows Mobile 7 will be the first release in WM history that totally breaks backward compatibility, so existing legacy code will have to be rewritten. However this is not official information and I expect to have this clarified during official preview at conferences in Feb and Mar.
New features and functionality updates include:
- New UI:
- Totally finger-friendly UI
- Multi-touch support
- Zoom support
- New menu system
- Based on Silverlight technology
- Hardware updates:
- Accelerometer
- Only two screen resolutions (WXGA and 720p)
- No suspend/resume power model. Device will always stay turned on.
- Smart Card support removed.
- Multiple folders and stores in Pocket Outlook Object Model (i.e. for contacts, calendar).
- Pocket Outlook Object Model will handle mail and note items.
- Task scheduling.
- Over-the-air updates like on iPhone and Palm Pre (user can update PIM without cradling device).
- Association Engine will allow to create custom voice commands.
- SmartSearch technology for better search experience.
- New photo API.
- New Office, IE, Media Player.
References:
Windows Mobile 7
Microsoft Zune Phone: Loaded With Windows Mobile 7 Ready To Kill iPhone
Windows Mobile 7 early build hands-on review, not compatible with old apps
Windows Mobile 7 Mockup
Windows Mobile 7 Exclusive Screenshots and Analysis!
Everything you need to know about Windows Mobile 7
Microsoft confirms Silverlight for Windows Mobile 7
A secret/hidden Windows Mobile 7 leak!
Windows Mobile 7: What we expect and what we are hearing
Windows Mobile 7: Fifteen New Details
Below is a snapshot that shows how to change screen orientation from normal to 90 degree rotated or from 90 degree back to normal depending on current screen state:
if (SystemSettings.ScreenOrientation == ScreenOrientation.Angle0) {
SystemSettings.ScreenOrientation = ScreenOrientation.Angle90;
}
else {
SystemSettings.ScreenOrientation = ScreenOrientation.Angle0;
}
To make this code compile don’t forget to import Microsoft.WindowsCE.Forms namespace.
New home screen available in Windows Mobile 6.5 should be refreshed differently for Professional and Standard editions of OS. It can be done using the same API methods as for earlier versions of Windows Mobile.
For Professional edition it can be done like this:
[DllImport("coredll.dll")]
private static extern IntPtr PostMessage(int hWnd, int msg, uint wParam, uint lParam);
private const int HWND_BROADCAST = 0xFFFF;
private const int WM_WININICHANGE = 0x001A;
public static void Refresh() {
PostMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
}
For Standard edition the trick is to provide correct GUID to API. This GUID can be found in SlidingPanel.home.xml file located in “\Application Data\Home” folder. Here is the code:
[DllImport("aygshell.dll")]
public extern static uint SHOnPluginDataChange(ref Guid clsid);
public static void Refresh() {
Guid guid = new Guid("{E9267CAB-02EE-4f37-8216-6BF6A8FF5A71}");
SHOnPluginDataChange(ref guid);
}
Here is a code for loading embedded image named MyImage.png stored directly in project directory:
Assembly assembly = Assembly.GetExecutingAssembly();
string iconFileName = string.Format("{0}.MyImage.png", assembly.GetName().Name);
using (Stream io = assembly.GetManifestResourceStream(iconFileName)) {
return new Bitmap(io);
}
Name of resource to load contains three elements divided by dots:
- Assembly name;
- Path where resource is stored inside of a project (must be omitted if resource is in project directory);
- File name of resource.
Path to resource should be created using names of folders. For example, if resource is in “Resources/Images” folder than path will be “Resources.Images”.
Normally saving XmlDocument leads to xml declaration at the beginning of file. In case it is desirable to omit it, XmlWriterSettings comes to help:
XmlDocument doc = new XmlDocument();
// Do with document whatever is needed...
// Save xml document without xml declaration.
XmlWriterSettings writerSettings = new XmlWriterSettings();
writerSettings.OmitXmlDeclaration = true;
using (XmlWriter writer = XmlWriter.Create(@"\omit.xml", writerSettings)) {
doc.Save(writer);
}
Making read-only file writable with full .Net Framework is a piece of cake: there is FileInfo.IsReadOnly. Just set it to false and it’s done.
With Compact Framework we need to use FileInfo.Attributes and a solid knowledge of bitwise operations:
FileInfo info = new FileInfo(pathToReadonlyFile);
info.Attributes &= ~FileAttributes.ReadOnly;
As I wrote in Linkpool: Windows Mobile 6.1 and 6.2 Build Numbers they have the same version (which by the way is 5.2). So checking if application is running under WM 6.5 must be based on build number. Like this:
Version osVersion = Environment.OSVersion.Version;
if (osVersion.Major == 5 && osVersion.Minor == 2 && osVersion.Build >= 21139) {
// It's Windows Mobile 6.5
}