Getting the Current Windows Phone App Version in code.

 

It’s often useful to display the current App version (per your App Manifest) for support purposes.  I came across the following snippet that looks to provide the easiest option that requires no manual updates when you release a new version of your app:

VersionTextBox.Text = XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value;

I usually use this in my about box similar to this (add a textbox named VersionTextBox to your xaml first):

image

Windows 8 – FlipView – Programatically adding Next and Previous

 

image

So when using a flipview control there is no need for ‘next’ and ‘previous’ buttons as they are built into the UI already:

image

But … the Windows 8 UI is new and unless you are using a mouse those buttons above will stay hidden.  So these programmatic buttons serve as clues that you can indeed go backwards and forwards through the apps detail screens (I have witnessed many people repeatedly using the back button to go back to the summary screen before touching the next item to go back to the details view – at least until the penny drops!

And the code is straightforward! Here is the XAML I used:

image

and here is the code behind:

image


NB You can download Surface News for free here:

http://apps.microsoft.com/webpdp/app/surface-news/0491cb58-5e16-4007-865b-f4058703ce91