The DLL is named Flaxen.SlimDXControlLib.dll and contains the namespace Flaxen.SlimDXControlLib.  In that assembly are three classes of interest:

  • SlimDXControl – This is the WPF control which you can place in your XAML.  No attributes or child elements are needed.
  • SimpleRenderEngine – You need to derive from this class and implement a few methods to set up your specific D3D world.  The example apps show how this is done.
  • RenderEngine – This is the base class for SimpleRenderEngine.  Serious D3D users will want to derive from RenderEngine directly, instead of relying on the boilerplate D3D code provided for you in SimpleRenderEngine.

To use a SlimDXControl in your application, you will need to do three things:

  1. Add a SlimDXControl content control into your XAML.
  2. Implement your D3D code, and put it into a class derived from RenderEngine or SimpleRenderEngine.
  3. Create an instance of your render engine class and pass it to the content control using the SlimDXControl.RegisterRenderer method.


Two examples are provided for your pleasure.

  • TriangleExample – This example shows how to implement a simple D3D drawing.  It features animation and shows that you can simultaneously render and display two different SlimDXControls.
  • MouseExample – This example app shows how to perform some mouse actions and do some of the basic coordinate transformations.  It includes a function demonstrating how to convert from screen coordinates (the mouse) to your world coordinates (D3D space) and it also supports resizing.

Each of these examples contain two classes of interest: the WPF main window itself and the D3D code in a class derived from SimpleRenderEngine.

Last edited Feb 2, 2011 at 6:04 PM by mpg, version 2


No comments yet.