Martin Gentry

I'm authoring an MC app and one of my current requirements (if at all possible) is to disable the display of the transport controls (play, pause, etc) in some situations. Is there a way to accomplish this


Re: Windows Presentation Foundation (WPF) Disable transport controls in Media Center XBAP?

Matt Galbraith

Hi Martin,

There's definitely no simple way to do this... not saying it's impossible, just very tough.

This is because when running Xbaps or other browser content in Media center, they are run simply as inside a WebOC object. While there might be some scriptable way to do this for HTML pages, the xbap itself has no way of communicating this to the host.

I will investigate this and reply back if I figure anything out. If it can be done via HTML, then it's a simple matter of launching the app inside an HTML frame, with that HTML page setting the enabled state of the controls you want. That doesnt work for setting this dynamically based on where the user is in the app though, so it's an incomplete solution.

-Matt Galbraith






Re: Windows Presentation Foundation (WPF) Disable transport controls in Media Center XBAP?

Martin Gentry

It will certainly be great if this is possible.

So far the only alternative seems to be implementing this as a standalone application that gets started via the media center interface that uses the full screen (much like the pre-installed games do) but this isn't so ideal given that its somewhat jarring as the app starts and MC drops out of fullscreen mode.




Re: Windows Presentation Foundation (WPF) Disable transport controls in Media Center XBAP?

Matt Galbraith

Hi Martin,

I'm starting to think that's not directly possible. I found the Media Center Programming reference here:

http://msdn2.microsoft.com/en-us/library/bb189477.aspx

This will let you do many interop actions with Media Center from within your Xbap, but disabling the transport controls doesnt appear to be one of them.

-Matt






Re: Windows Presentation Foundation (WPF) Disable transport controls in Media Center XBAP?

Martin Gentry

Thanks for looking into it Matt.

I contacted Aaron Stebner (Program Manager for Media Center) through his blog and he got back to me saying that its not possible to disable the controls.




Re: Windows Presentation Foundation (WPF) Disable transport controls in Media Center XBAP?

Martin Gentry

I have since managed to notice that I overlooked the UiFlags attribute for the <entrypoint> node in the XML for registering an MCE application.

See documentation here: http://msdn2.microsoft.com/en-us/library/ms813936.aspx

"UiFlags

Optional. A comma-delimited string used to affect certain Windows Media Center UI features. The only option is "HideTransportToolbar", which hides the mouse transport controls (this toolbar is located in the lower-right corner of the Windows Media Center UI, which appears when the user moves the mouse, includes buttons to perform actions such as pausing, stopping, and rewinding). This flag should be used only in extremely rare cases, because when this toolbar is hidden, mouse-only users will be unable to control media playback while using the application."


So it's not possible to disable the controls programmatically from code, but it is possible to have the entrypoint defined so that the transport controls do not ever display while the user is in your application.