WPF Caching visual elements for better performance

More precisely how can we cache UI elements, since the property I’m going to describe is located at UIElement class, to improve the performance of the WPF control. Recently I had to implement a custom control in WPF. The goal was to display a list of some processes with steps in a Gantt chart. I decided the control will be based on a set of Grid panels where each cell indicates…

By Mirek on (tags: BitmapCache, CacheMode, custom controls, Gantt, WPF, categories: architecture)

XAML styles in external assembly

Today I will show you how to use the XAML styles located in resource dictionary in external assembly. I will also try to point out the common problems that can raise during this process. We start with one project WPF application and the resource dictionary included in main window dictionary. and we want to extract the styles from section Window.Resources, place them in separate…

By Mirek on (tags: resources, styles, WPF, XAML, categories: architecture)

WCF Data Services performance

The main benefit of using WCF Data Services (formerly codename ) is that this is interoperable, which means it can be accessed from clients created in different technologies. Moreover standard WCF services offers the only exposed set of methods. Data Services, as implementation of OData protocol, offers the Resource to be queried and altered using HTTP methods. That’s are the p…

By Mirek on (tags: Data Services, OData, WCF, categories: architecture, code)

Application communication ways – WCF Data Services with EF Code First, WPF and WP7

Let’s assume there is an application database and the various client applications developed in Windows Presentation Foundation, Silverlight, Windows Phone 7 and ASP.NET MVC 3. The database is either MS SQL Server or MS SQL Server CE. Now the potential customer may use one or many of these applications/platforms so the connections to the database must be performed from all of th…

By Mirek on (tags: OData, WCF, WP7, categories: architecture, infrastructure)

Abstract repository for direct EF, WCF and WCF Data Services connection with database.

In this article I would like to show you my implementation and approach for using abstract repository no matter if the client is connecting directly to the database using Entity Framework, over WCF service or WCF Data Services (WCFDS) service. 1. General explicit repository The goal here is to have common interface of the repository so the client application does not care about…

By Mirek on (tags: Code First, Entity Framework, WCF Data Services, categories: architecture, code)

Authentication, Authorization and other things we shouldn’t worry about any more

Recently I needed to do some research on the topic of authentication, authorization and related stuff. After spending quite some time on it, I was pretty depressed – one would imagine, that a topic so common has already been handled in a standardized, common and comfortable (both for the user and the developer) way – well, it hasn’t, or do I demand to much? Requirements I had a…

By on (tags: authentication, categories: architecture)

Dependency Injection Containers

In a previous post, I tried to describe what inversion of control is. Here, we’ll take a look at the design pattern that helps with it. Dependency injection is a design pattern used to handle the problem of tight coupling between classes. Although it helps a lot, it’s not perfect. There are situations in which the pattern becomes cumbersome – the best example is probably nested…

By on (tags: IoC, categories: architecture)

A quick intro to IoC

There are two terms that have been loudly spoken for a while now IoC (Inversion of Control) and DI (Dependency Injection). In this post, I’ll try to sketch a picture of what these terms actually mean. IoC is an abstract principle regarding software construction that has been invented to fight the problem of tight coupling. Let’s take the following code sample: This looks like a…

By on (tags: IoC, categories: architecture)