An example C# project which shows the usage of direct2d within a WPF window via SharpDX. The project also includes some classes, which you can directly copy to your project.