This project is read-only.

PlaylistPlugin.Playlist is not bindable

Topics: Windows 8 Xaml
Jun 11, 2012 at 11:33 AM

PlaylistPlugin.Playlist is not bindable – i.e. this doesn’t work:

<mmppf:MediaPlayer Name="Player">


               <adaptive:AdaptivePlugin />

               <mmppf:PlaylistPlugin Playlist="{Binding MyPlaylist}" />




We have to set the Playlist explicitly

((PlaylistPlugin)Player.Plugins.Single(p => p.GetType() == typeof(PlaylistPlugin))).Playlist = …


 Will this change on future releases?

Jun 12, 2012 at 6:05 PM

I've been able to confirm the issue. Thanks for reporting this, I'll try to get this addressed for the next update.

Jun 12, 2012 at 6:41 PM
Edited Jun 12, 2012 at 6:41 PM

It turns out, DataContext is not passed along to children of collection properties in Win8 Xaml and this is causing the issue. I'm not sure if this is a Win8 bug or expected behavior. However, here is a fairly easy way to bind to the playlist that works today...

        <local:vm x:Key="vm"/>
    <Grid Style="{StaticResource LayoutRootStyle}">
        <mmppf:MediaPlayer x:Name="player" IsSkipPreviousVisible="True" IsSkipNextVisible="True">
                <mmppf:PlaylistPlugin Playlist="{Binding Playlist, Source={StaticResource vm}}"/>

public class vm
    public ObservableCollection<PlaylistItem> Playlist
            return new ObservableCollection<PlaylistItem>(new[] { 
            new PlaylistItem() { Source = new Uri("") },
            new PlaylistItem() { Source = new Uri("") },


Jun 12, 2012 at 10:24 PM

Thank you!

Sep 13, 2013 at 10:48 PM
I am having setting the playlist explicitly and then playing it. Even though I set it though code. I can set the playlist using the same code as above but it does not play. Any help will be appreciated.

Sep 16, 2013 at 6:17 PM
@naveedzaheer, it may be a timing issue. If you set the playlist after or during the Initialized event, you need to also manually set CurrentPlaylistItem in order to cause the playlistitem to be loaded. If you set the playlist collection before Initialized, the first playlistitem should get automatically loaded.