Microsoft Visual Studio 2010 professional / Microsoft Visual C# 2010 Express (Don’t know if this method works on older versions).
If you are not adding this to a current project then create a Visual C# > Windows > WPF Application.
Add a User Control to your project (Project > Add New Item > Visual C# > User Control).
Open the Toolbox (if you can’t see this: View > Toolbox).
Right Click anywhere on the Toolbox then click on Choose Items. (This may take a while to open)
Navigate to the COM Components tab, find and check “VideoLAN VLC ActiveX plugin v1” (axvlc.dell) and press OK.
Now in your Toolbox you should see “VideoLAN VLC ActiveX plugin v1”. Double click on it and set its Dock Property to “Fill”
Now save an build your project (Build > Build Solution.. or press F6)
In the Solution Explorer under References you should now see “AXVLC” and “AxAXVLC”. if you don’t add them manually by right clicking on References, go into your projects debug folder and add “AxInterop.AXVLC.dll” and “Interop.AXVLC.dll”.
Right clicking on References in the Solution Explorer, then Add Reference; Browse to the .NET Tab and find and select “WindowsFormsIntegration”, then press OK.
Now in MainWindow.xaml (or where ever you want to add it to), Add a name to your grid (or the container)… i named mine “grid1”.
From the toolbox add a WindowsFormsHost to the grid, and name it. I named mine “WFH1” (see Figure 1)
Now right click on your main window and click on View Code.
Declare “AxAXVLC.AxVLCPlugin” as a global variable. (AxAXVLC.AxVLCPlugin vlcPlayer = new AxAXVLC.AxVLCPlugin();
in your default constructor add the player object as the child of the WindowsFormsHost (WFH1.Child = vlcPlayer;)
And that’s it! you wont see anything when you run the program, but the player is there, i will post a code snippet below so you can get a file to open and play in it (Figure 2).