Click here to Skip to main content
15,884,838 members
Articles / Desktop Programming / WPF

D3dHost - MDX and WPF interoperability

Rate me:
Please Sign up or sign in to vote.
5.00/5 (7 votes)
13 Nov 2012CPOL5 min read 34K   2.6K   20  
This article shows how we can render an interoperable MDX (Managed DirectX) scene, inside a WPF window.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;

namespace MdxWpfInteroperability
{
    public class D3dSurfaceMouseWheelEventArgs : RoutedEventArgs
    {
        #region Constructors
        public D3dSurfaceMouseWheelEventArgs()
        {
        }

        public D3dSurfaceMouseWheelEventArgs(RoutedEvent routedEvent)
            : base(routedEvent)
        {
        }

        public D3dSurfaceMouseWheelEventArgs(RoutedEvent routedEvent, object source)
            : base(routedEvent, source)
        {
        }
        #endregion

        public MouseWheelEventArgs MouseWheelEventArgs { get; set; }
        public Point D3dSurfaceMousePosition { get; set; }
    }

    public delegate void D3dSurfaceMouseWheelEventHandler(object sender, D3dSurfaceMouseWheelEventArgs e);
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions