WPF– visual states in MvvM

WPF has many rich features which facilitates making a great look&feel of the application. Unfortunately many of those features are cumbersome to implement and use when we develop in a Model - View – ViewModel architecture. In this post I will try to make you more familiar with visual states and how can we use them in our MvvM application.

By Mirek on (tags: behaviors, Expression Blend, Visual state, WPF, categories: code)

Using SQL FileTable in Entity Framework

FileTable is a great new feature in SQL Server 2012 which facilitates storing and working with unstructured blob data in SQL Server. Unfortunately is not yet supported in Entity Framework, so you cannot simply use FileTable in your entity model. But there is a workaround for this inconvenience, which I am going to show you in this post.

By Mirek on (tags: Entity Framework, FILESTREAM, FILETABLE, SQL, categories: architecture, infrastructure, code)

Entity Framework – lazy loading properties

In the Entity Framework we can easily enable lazy loading of navigation properties by marking them as virtual. This however applies only to properties that reference other related entity type. The framework does not support lazy loading of scalar or primitive properties. But there is a trick to fill this lack quite easily.

By Mirek on (tags: Entity Framework, lazy loading, shared primary key associations, table splitting, categories: architecture, code)

Mocking application settings

Last time I showed a simple way of using application settings in our wpf application. This time I would like to present you my way of testing Properties.Settings, or rather mocking it in our application tests.

By Mirek on (tags: mocking, settings, testing, categories: code)

Keep your temp folder clean

Temporary folders in your system are used to store temporary files obviously. Unfortunately those temporary files, very often, stays there for ever and makes your hard drive wasted.

By Mirek on (tags: Process, Task, Temp, categories: code)

One collection – many views

Let’s imagine we have a huge collection of some objects (may be our data objects) and we need to filter this collection and display only a part of its elements in different places in our WPF application. Instead of creating many different instances of sub collection we can use the benefits of collection views.

By Mirek on (tags: CollectionView, WPF, categories: code)