March, 2013
15 03 2013
In .Net 4.0 Microsoft indroduces a new universal cache. For quite some time caches were already present in ASP.Net, but could (should) not be used in C# or VB.Net. With the new package System.Runtime.Caching there is now an easy way to implement a cache in any program, like a WebService or WPF-Application. As you will […]
C#, Cache, NET
12 03 2013
Modern applications use animations to create nice effects and shorten waiting times. In a pie-chart its also used to show the difference between values or for presentations. To create such an effect we’ll again reuse the Pie-Class i created earlier and add the shadow effect to it. With WPF its very easy to generate different […]
animation, Shape, WPF
11 03 2013
In some cases it is necessary to cleanup unmanaged resources before the GC will do that. Because the GC only have the hand over managed but not unmanaged resources. So you won’t know when exactly unmanaged resource are cleaned up. For this you have to cleanup manually. A pattern for this work is called IDisposable. […]
C#, IDisposable, Interface, NET, Resources, Unmanaged, using
10 03 2013
As always you will find alot of crapp about shadows in WPF on the internet. And again, here is a HowTo to show you an easy way to do it. To demonstrate the shadow we’ll use the Pie-Code from my last Post. Now we’ll just set the shadow effect for one of the pies. As […]
DropShadowEffect, effect, shadow, WPF
8 03 2013
It is very easy to extend controls in WPF, but only with code behind you can do the real cool stuff. When you search the internet for code to draw a part of a circle, you will get alot of crappy code. Some try to do it with XAML-Code but can’t calculate the needed values […]
custom control, PieChart, Shape, WPF
4 03 2013
Since WPF and especially Windows 8 its obligatory to build responsive UIs. This means, the UI is always responding to an user-request even if a long taking request is made. An easy way to achieve this is a background worker, which is nothing more then an extra thread which can work with the UI-Thread. If […]
backgroundworker, DataGrid, responsive UIs, thread, WPF
1 03 2013
Today I want to show you, how we can use method parameters to solve specific problems. At first, we’ll look at ref and out. Normaly a parameter is used to give a value into a function or method. But sometimes we need a different behavior. If we want to return multiple values the out-keyword is […]
C#, out, params, ref