MediaPlayerDetails CommandList tip

If this helps anyone:

The built in MediaPlayerDetails command list in combination with GlobalCache IR devices has always been annoying. The CommandList is where it dumps all of the IR commands that don’t fit into other parts of the controller.

The CommandList is by default a latch - so if you press a command in the list, it holds selection on that command until you press something else. A lot of IR commands you want to press multiple times, like a Bluray player Display button.

I figured out you can do this by changing the MediaPlayerDetails template.

Find the GridView(CommandList) section, set “SelectedValue” to blank, and then add an EventTrigger to the Triggers list.

Add a DataAction to it that:

Binding: {Binding @Device.MediaCommand}
Operator: =
Value: {Binding ElementName=CommandList, Path=SelectedValue}

Then add a PropertyAction to the same EventTrigger:

TargetName: CommandList
Property: SelectedValue
Value:   (blank, enter nothing here)

What this does is override the built-in SelectedValue routine and makes a new one that fires the command, then undoes the selection. In practice you’ll now see a CommandList command blink on tap, allowing multiple taps on each command.

As always, make a backup of your template before you do this, and your mileage may vary.