rss
 
comment(s)

archives
J|F|M|A|M|J|J|A|S|O|N|D
(20##) 10 9 8 7 6 5 4 3 2 1 0 <
 
DesktopWeb FormText   WPF : interop with MediaPlayerTue, 25 Oct 2005 01:42:37 GMT # 

beating my head against the wall again tonight. if i dont use the ImageBrush, then my WPF app can host a WinForms control that is hosting MediaPlayer. it starts up and automatically starts playing a DVD ... pretty sweet. but now i'm trying to interact with the embedded control. in WinForms, i can just start clicking around with the arrow buttons and the space bar to navigate the DVD menu. in WPF, none of those key presses are making their way to MediaPlayer. a little hunting tracked down the Focusable property which let me clean up some other unrelated code. some WPF elements are not Focusable by default, meaning they wont receive any click events. my hack to get around this had been to embed unrendered elements in the form and set focus to them ... effective, but wrong. regardless, that did not help me with MediaPlayer. at least i can click on the DVD menu with a mouse. but the MediaPlayer sucks up all the other click events so they dont make their way to my hosting panel. some keyboard commands do make their way to the hosting panel, so i tried to use those to exit out of the DVD hosted panel. the problem is, MediaPlayer does not want to give up control of the window. even if i collapse the hosted panel, turn off visibility, whatever ... and then set visibility to the new panel i want to display ... that new panel will not render. crap. what i really wanted to do was overlay a panel on top of the MediaPlayer ... but i cant even get it to go away. when i do overlay the panel ... it doesn't display. all i see is the DVD rendering. at this point i cannot adequately control the DVD or MediaPlayer from my application. since this app is a learning experiment, read throw away, i'm just going to polish up a couple places and move on to the next piece of functionality.