Need help with ContainerBindings

2 posts, 0 answers
  1. Robert
    Robert avatar
    12 posts
    Member since:
    Jul 2010

    Posted 29 Feb 2012 Link to this post

    When the user clicks the icon in the lower right corner of the player to show the list of videos, is there a way to bind to and display multiple pieces of information related to each video? For example, along with the video title I'd like to display the video date and a genre.


           <telerik:RadMediaPlayer x:Name="player" IsChaptersPanelPinned="True" IsVideoPanelPinned="False" SelectedIndex="0">
                                   <telerik:ContainerBinding PropertyName="Source" Binding="{Binding VideoUrl}" />
                                   <telerik:ContainerBinding PropertyName="Title" Binding="{Binding Title}" />
                                   <telerik:ContainerBinding PropertyName="Content" Binding="{Binding Title}"/>
                           <StackPanel Orientation="Horizontal">
                               <StackPanel Margin="8">
                                   <TextBlock Text="Name: " FontWeight="Normal" />
                                   <TextBlock Text="{Binding}" Margin="4" FontWeight="Bold" />

    public class Video
            public string Title { get; set; }
            public DateTime UploadDate { get; set; }
            public string Category { get; set; }
            public string MediaType { get; set; }
            public string Region { get; set; }
            public string VideoDescription { get; set; }
            public string VideoUrl { get; set; }

  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 05 Mar 2012 Link to this post

    Hi Robert ,

     I prepared a sample project for you that uses your code. Basically, the only property that you need to use in ContainerBindings (SL4) or StyleBindigns (SL5) is the Source Property of the MediaItem. 
    Please check out the suggested solution and let us know if it satisfies you.

    All the best,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top