Archive | November, 2012

Resource Dictionary for Windows Phone

6 Nov

One of the missing templates in the Windows Phone SDK is Resource Dictionaries. If you work with styles and resource dictionaries, the missing template is a big thing.

Worry no more! I have created the template you need!

You can get them ItemTemplate from my SkyDrive and install it in your ItemTemplate folder, typically located here:
C:\Users\[USERNAME]\Documents\Visual Studio 2012\Templates\ItemTemplates\Visual C#\Windows Phone\1033

// thomas

Installation Folder in Windows Phone 8

2 Nov

The installation folders for Windows Phone apps (also known as appdata) are read-only and reading data from files in the folders hasn’t always been the best experience. We have been able to use GetResourceStream to stream files from the appdata folder and DataContext to work with a local database.

With Windows Phone 8 we got some improvements. We got a new property of the current package called InstalledLocation. It returns the installation folder as a StorageFolder and using the Path property it’s possible to get the full path of the installation folder. Using the StorageFolder we are able to work with the files in the appdata folder.

The content of the appdata folder can easily be accessed using the appdata or ms-appx URI scheme names. Although the two schemes point to the same location, there is an important difference in the usage of the two. Use “ms-appx:///” for accessing the appdata folder with APIs that are part of the new Windows Phone Runtime (part of the Windows namespace). In all other APIs use “appdata:/”.

If we want to get a file asynchronisly we can use Windows.Storage.StorageFile.GetFileFromApplicationUriAsync
to access the file. As the API is part of the new Windows Phone Runtime, it is required we use “ms-appx:///” to access our file:

If we just want to specify an Uri we can use “appdata:/”:

// thomas

Templates in Visual Studio 2012

1 Nov

For some time now I have developed XAML based Windows Store apps using Visual Studio Ultimate 2012. The apps are built for clients as part of my company targeting consumers. What I’m trying to get to is that I use Visual Studio and the built-in templates quite a lot. And with that also comes some features requests :)

The built-in solution templates are fine. They are good for getting started and learning about the new guidelines for building Windows Store apps and Windows Phone apps. I guess that every Windows Store developer have tried to build a demo app based on the templates. So my issues comes to adding new items to my projects. Every time I add a new Page or new UserControl to a project, I have to delete 20 lines of comments in the XAML and in the code-behind (especially for Windows Phone 8). The comments describe how to get started using the items and how to read more about the type of item. This is great information for new developers or developers getting to know the platform – but it’s not appropriate in a pro tool like Visual Studio Ultimate. Why not have it in a starter kit or in the Express editions of Visual Studio (only).

To answer a comment that most likely will pop-up – yes I’m aware that it’s possible to customize the content of the items. It just shouldn’t be necessary in pro tools like Visual Studio. I think.

// thomas

Where is the Skype app for Windows Phone?

1 Nov

Yesterday I wrote a blog post asking about the missing Build app for Windows 8. Rumors says the app is built but failed certification hence not available for the attendees – it has not been confirmed by Microsoft!

Until today Nokia Lumia 800 have been my primary phone. Today I’m taking my new Nokia Lumia 920 (thank you Microsoft and Nokia!) and doing it the only true way – making it my primary phone. It’s a big phone but the technical features are awesome and combined with Windows Phone 8 I expect a great experience. I have customized it (making it my own) and I already love some of the new features – especially the “Rooms” feature – it’s really communication made easy!

For the last couple of months I have been addicted to Skype. With the new Skype app for Windows 8 my expectations for the running the app on a Windows Phone 8 device was pretty high. I have been running Skype on my Lumia 800 but it’s almost useless without a front faced camera. Open the store, searching for Skype and gets several results – but no Skype app?! Frustration kicking in! Searching the internet to get an answer.

Turns out that Skype have built a new app from the ground up for Windows Phone 8 supporting some of the new awesome features available in the Windows 8 app and using the new features available in Windows Phone 8. Skype have announced that it is soon-to-be available. Read the full story and get an overview of the new features at their blog or take a look at this video.

// thomas

Follow

Get every new post delivered to your Inbox.

Join 1,413 other followers