Blog: WinRT

Recommendations and best practices for implementing MVVM and XAML/.NET applications

January 30, 2015, (updated on November 2, 2017), 32 comments, Software Development

In this article I’ll describe the rules and practices I’m following for XAML and MVVM application development. I’m using the described techniques since multiple years and they have proven themselves for me. Most of the described rules apply for all types of XAML projects – Windows Store, Windows Phone, Silverlight and WPF projects. Sample code: The source code of the application Visual JSON Editor contains sample implementations for most of the discussed recommendations. Some sample code snippets in this article use the MVVM classes from the MyToolkit library which is developed by myself. Project file structure All MVVM/XAML applications should […] Read more...

Tags: , , , , , , ,

Develop an app which targets WP7 and WP8 (and WinRT) at the same time

August 16, 2013, (updated on September 8, 2014), Software Development

This post shows how to develop an app which targets the WP7 and WP8 platform at the same time. The idea is to create two projects – one for WP7 and one for WP8 – and link all files into one of the projects. This way you don’t have to maintain the code twice and only have to develop in one project. On Microsofts website you can find the base idea. However this article shows even more problems and their solutions when using this approach. Here are the steps to setup the solution: 1. Create the Visual Studio solution Create […] Read more...

Tags: , , ,

Sketchagram diagram editor for Windows 8 released

February 9, 2013, (updated on October 20, 2014), Apps

The first version of Sketchagram has been released to the Windows 8 App Store. Show website Show in Microsoft Store The following video shows the application in action: Read more...

Tags: , ,

WinRT: Access string resources in a stongly typed way (C#)

January 21, 2013, (updated on January 30, 2015), Software Development

In WinRT/C# projects the .resx resource file is not available anymore. The new resource type is .resw which is directly supported by the XAML framework. The drawback of this new file format is that it does not automatically generate a code-behind C# class with a property for each key-value resource pair. The problem is that it is not possible to access these strings in a strongly typed manner. The only way to load resource strings is to load them by specifying the resource key as a string. The problem with this solution is that typing errors are not detected by […] Read more...

Tags: , ,

WinRT: Navigate to the previous page by pressing the back key

July 25, 2012, (updated on September 8, 2014), Software Development

If you are developing Metro applications, it is evident to not only have a good tablet experience but also a a good desktop (mouse and keyboard) experience. This is why I implemented a simple solution to navigate to the previous page if the user presses the back key. A lot of standard applications in Windows 8 support this feature already and I hope a lot of new applications will support it as well. The usage of my code is very simple: Just call the RegisterBackKey method if the page has been loaded – the rest will be handled by the […] Read more...

Tags: , , , ,

Implement secure WCF web services to use with Windows Phone and Metro style apps

April 30, 2012, (updated on October 20, 2014), 2 comments, Software Development

The first part of this blog post demonstrates how to implement a WCF web service with username/password authentication and role based authorization. The web service can be used in Windows Phone applications and Windows 8 applications and it is even possible to use it with other libraries or frameworks. The second part explains how to set up the development environment to test the web service and the client application locally. The sample project can be downloaded here. Web service code First we have to create a new web service project and create a web service (.svc and its corresponding .svc.cs […] Read more...

Tags: , ,

Create Task-based method from “legacy” callback method

March 20, 2012, (updated on November 5, 2015), 4 comments, Software Development

In my projects I have a lot of asynchronous methods with a callback as parameter which is called when the operation has completed. I asked myself how to port these methods to support the new async / await keywords and if possible allow me to use the class with older frameworks which do not support this new functionality. The samples in this article use the Http classes from my library project MyToolkit. We start with a simple method called LoadHtml which will call the callback action completed after completion: public void LoadHtml(String url, Action<HttpResponse> completed) { Http.Get(url, completed); } To […] Read more...

Tags: , , , ,


  Page 1 of 1