Target Invocation Exception

Feb 4, 2011 at 11:39 AM

Hello World,

first, thanks for the MediaKit, I love it ;)

But it's not working in my project.

I only tried this quick example code:

 

DockPanel dpanel_dvd = new DockPanel();
var dvdplayer = new DvdPlayerElement();
dvdplayer.BeginInit();
dvdplayer.PlayOnInsert = true;
dvdplayer.DvdDirectory = @"I:\VIDEO_TS";
dvdplayer.EndInit();
dvdplayer.Play();
dpanel_dvd.Children.Add(dvdplayer);
DockPanel.SetDock(dvdplayer, Dock.Top);
Content = dpanel_dvd;

It's crashing with this code an tells me a Target Invocation Exception.

 There's something wrong with the dvdplayer.DvdDirectory, in your code example it's an Uri Path, in my example I have to write a string.

Thanks for your answers,

Tim