Rico Suter's blog.
 

Articles

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

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.
Read More ›

Using Entity Framework Code-First proxies with WCF web services

This blog post demonstrates how to set up a WCF web service together with lazy loading Entity Framework entities. The entities will be developed using a code first approach and their metadata is defined using the fluent API. To use all these features you need to install the newest Entity Framework (version 4.3.1 as of now) as a NuGet package (search for “Entity Framework“).
Read More ›

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

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.
Read More ›

XBMC remote for Windows Phone

I’d like to introduce my XBMC remote app for Windows Phone: It is called “XBMC remote” and can be downloaded from the Windows Phone Marketplace. XBMC is a media center software designed to use with a TV and can be downloaded and used for free. The application only works with the newest XBMC release, XBMC 11 Eden. With the “XBMC remote” app you can browse your recently added media, albums, artists, music videos, movies and TV series:
Read More ›

Jumpy ListBox while scrolling in Windows Phone 7.5

I recently discovered a bug in the ListBox control for Windows Phone 7.5. In a long list of items (virtualizing list, items with different heights), the list sometimes begins to get jumpy and the list cannot be scrolled to the end. To reproduce the problem, open a long list of items, scroll a little bit, stop the scrolling and tap on an item. Now if you start scrolling again the list begins to get jumpy…
Read More ›

Create Task-based method from “legacy” callback method

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.
Read More ›

Retrieve Entity Framework DbContext from a proxy object

There are some situations where you need to get the DbContext from a proxy object generated by the Entity Framework (current version: 4.5). Every generated proxy object holds a reference to the ObjectContext it belongs to. The problem is, that the ObjectContext does not have any information or reference to the corresponding DbContext. My solution is to maintain a static list with a ObjectContext-DbContext-Mapping:
Read More ›

Reusable page transition animations in Windows Phone 7/8 Silverlight

I searched a while finding a simple solution to add transition animations for my Windows Phone 7 application.
Read More ›

Transactions in the Entity Framework

First, I’ll show an example of the correct usage of an Entity Framework’s ObjectContext. At the beginning of the usage block, the ObjectContext is created; at the end it will be disposed (see using-Keyword).
Read More ›

Interceptors with PHP

Interceptors are used for aspect oriented programming (AOP). With the given interceptor, method calls can be extended or suppressed. PHP interceptors are implemented using the _call magic method.
Read More ›