30 Nov 2012

Presenting on Windows 8 - Pro tip

image

This tip is aimed at presenting, but is just as useful to those who want to focus in Windows 8 without distractions!

Windows 8 is a great operating system to use, especially the background tasks system that ensures other applications are not destroying your CPU & memory. However, there is a downside to background tasks!

Previously, if I wanted to ensure no annoying Skype popups (during my talks for example) I just shutdown Skype and no popups could occur, but in Windows 8, since the application isn’t running, how do we stop the popups?

It is a simple solution, bring up the settings charm (see image on left) and in the bottom right hand corner is an option called Notifications. If you tap that, you will get options to block notifications for 1, 3 or 8 hours.

I am tending towards 3 hours for my 1 hour talks to allow for setup, clean-up etc.

image

Once you have disabled it, the icon will change to show you it is disabled! If you want them back, for example when you are finished, then you can tap the icon again to enable them!

image

What is great is that live tiles & the background tasks still occur, just no popups anymore.

10 Oct 2012

Windows 8 and how it breaks applications in South Africa!

Before I start thank you to Mike Geyser for for bringing this up on Twitter.

Recently I wrote about what is the correct way to display currency in South Africa, which was meant as an interest post rather than anything related to Windows 8 or development – but it seems to be serendipitous in it’s timing. The post referred to the currency format and how you should use a comma to separate Rands & Cents. Windows has always (at least as far back as Windows 98) respected this as the correct currency format in South Africa.

Here you can see Windows 7 (left) and Windows 8 (right) have the same settings.

windows7currencywindows8currency

However with Windows 8, Microsoft have decided to be correct everywhere so if you compare the number format settings in Windows 7 (left) it uses a full stop where Windows 8 (right) uses a comma for number formatting.

windows7numberwindows8number

The problem is that the number format setting is used in .NET for parsing which means that all numeric code parsing code will break in Windows 8 if you have the South African formatting set!

var testOne = Decimal.Parse("10.2"); // works in Windows 7 and before - exception in Windows 8
var testTwo = Decimal.Parse("10,2"); // works in Windows 8 but fails in Windows 7 and before

The exception that will be raised is: System.FormatException: Input string was not in a correct format.

To be fair, Microsoft has said you should never write code like that, you should always provide the culture settings when parsing (this code always works):

var rightWay = Decimal.Parse("10.2", CultureInfo.InvariantCulture);

There are also two other ways to handle this:

CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
var anotherWay = Decimal.Parse("10.2");

In summary when going to Windows 8, make sure you properly test your applications and you test them on the culture that the users will use.

03 Oct 2012

Windows Store app Development Snack: What's in a name?

For more posts in this series, see the series index.

During development of Zune, then Windows Phone and finally Windows 8 the term Metro was used to define the UI design style, this was later extended to explain what a desktop app is versus a Windows 8 app is. However Microsoft has stopped using the name and recommended developers stop using the name too so what should we call these things?

Metro apps – these are now called Windows Store apps. Visual Studio uses this name too so shouldn’t be too surprising. Note one pedantic pro-tip: app’s is ALWAYS lowercase.

Metro as in the style – As I explained Metro started out as a way to explain the UI design, that is now known as the Microsoft design style.

Metro principals – Finally we often talk of the 8 traits or principals of a great Metro Windows Store app and one of those is Embrace Metro Windows design style principals:

  1. Show pride in craftsmanship
  2. Do more with less
  3. Be fast and fluid
  4. Be authentically digital
  5. Win as one

Source: http://msdn.microsoft.com/en-us/library/windows/apps/hh464920.aspx

02 Oct 2012

Windows Store app Development Snack: Publishing your app, what has to be done before you publish?

For more posts in this series, see the series index.

imageDevelopment is done and not just done, but done-done. You have logged into the Dashboard and want to submit your application – there are two things that must be done PRIOR to you publishing successfully, and both are on the right hand side menu under Profile.

Payout

Payout is used to setup which account money will be paid into – if this is not setup your app will not even go through certification! You may think this only applies to those doing paid apps – it doesn’t. ALL apps, even free ones, need this setup first.

When you do payout setup it is going to ask you for one of three values (from what I can gather):

  • Credit card CVV – the simplest option.
  • Transaction amount – Microsoft will put through a transaction on your account and you need to put in the cents portion of that amount.
  • Transaction code – Microsoft will put through a transaction on your account and you will need the magic code in the description.

Below is a screen grab from my account statement, so if they asked for amount it would be 29 and if they asked for code is would be 851.

image

There is two final points around payout that are vital to remember:

  • Limited attempts: You get a few attempts to put the number in. Get all these wrong and your account is locked. You will need to deal with support who must escalate for you to other teams and this will take DAYS.
  • Transactions take time: If you are not lucky enough to get a CVV check then you will get the one of the transaction checks. These can take time to appear, especially if you are not in America – so if you do not see it immediately, wait two days. DO NOT TRY AND GUESS because you will hit your limited attempts.

Tax

The second issue is tax – once again this must be completed by EVERYONE. However having invalid tax forms will not block certification, it will merely block publishing. The form is easy to use but an annoyance is that even after you complete it the status will remain invalid. It stays invalid until it is verified by the system. So read invalid as either not done or not processed.

01 Oct 2012

Windows Store app Development Snack: Where is Microsoft-Windows-TWinUI exactly?

For more posts in this series, see the series index.

imageA lot of the guides for developing Windows Store apps talk about an event log where you can see information from the apps – this is of special importance for those doing background processing, live & secondary tiles. In the documentation it is either called just TWinUI or it is called Microsoft-Windows-TWinUI, however you may battle to find that in the event viewer since the group it is in, is not named that.

To get to it go to

  1. Application and Services Logs
  2. Microsoft
  3. Windows
  4. Apps

And you will find it inside that group! Happy debugging.

29 Sep 2012

South African Postal Codes

Mailbox-190-white-solid organge background

South Africa, as with many countries in the world, uses a numerical postal code system to help work out where to delivery mail – however besides some high level consistency there really is very little rhyme or reason in the numbers.

This little tool allows you to search, share, browse & pin the postal codes you need – when you need it!

This tool was inspired by my Postal Code apps for Windows Phone 7 – and really allowed me to experiment with the concept of how you can take & share development resources (including code) between two platforms.

Download

This app is also in the Apptivate competition so please go there and vote for it by clicking the image below:

apptivate

screenshot_09152012_093250screenshot_09152012_093337

South African Postal Codes makes use of icons created by the awesome (& free) Metro Studio 2.

29 Sep 2012

Portal 2: Lab Rat for Windows 8

aperture-190I love Portal, both the first & second games were amazing but what happened between them is never clearly explained in the games. Valve released an amazing comic book called Lab Rat a while ago that explained it! I enjoyed it so much I created a Windows Phone app for it. One of the things I had to do in that app was use very LOW resolution images and I was never happy with that.

Now I am proud to announce not only have I solved that but I also get to share my second Windows Store app – Lab Rat!

This is a GREAT Microsoft Style experience – high resolution images, full screen, touch – it all just works amazingly well together (see images below).

Having a new platform let me bring in ridiculously high resolve images too (which is why this download is over 250Mb worth of content), but not only the original English images but also the images without text (as in the Windows Phone app) and, for the first time, the Russian version too!

Download

As with my previous Windows 8 apps, this app is in the Apptivate competition so please go there and vote for it by clicking the image below:

apptivate

screenshot_09162012_195444screenshot_09162012_195509screenshot_09162012_195518screenshot_09162012_195459


Updates

Release 2 - 9 October 2012

  • Added the ability to zoom & pan images
  • Minor tweaks
28 Sep 2012

Windows Store app Development Snack: Lock screen image pain

For more posts in this series, see the series index.

imageIn a recent application I made use of the amazing Metro Studio tool for the logo of the application and needed to create a lock screen image. Lock screen images must be white & transparent and 24px square so I used the tool to create the image as in the image below.

image

However I kept getting an error when trying to certify the app:

Image reference "ClusterGroup.png": The image "\ClusterGroup.png" has an ABGR value "0x9BFEFEFE" at position (8, 0) that is not valid. The pixel must be white (##FFFFFF) or transparent (00######).

Huh?! My image is white & transparent! Using the awesomely improved graphic editor in Visual Studio 2012 I went to check the pixel (column 8, row 0) in the error message. I used the eye dropper tool to get the colour into the right hand window and sure enough it isn’t white. It is a grey colour used to anti-alias the image. (This has been reported to SyncFusion – but no response at time of publishing)

image

The problem is this is not valid you can either have:

  • Fully transparent – from the error message the alpha channel needs to be zero and the RGB can be anything: 00######
  • White – from the error message the RBG must be max (so white) and then the transparency can be set to anything: ##FFFFFF

The second one means you can have solid white #FFFFFFFF or a more transparent option #77FFFFFF (for example). The idea is to use the transparency rather than a grey colour to anti-alias. For me the fix was to manually edit the pixels to fix this.

Pages