ComponentOne MediaPlayer for WPF and Silverlight
C1MediaPlayer Task-Based Help / Showing the Chapter List on Page Load
In This Topic
    Showing the Chapter List on Page Load
    In This Topic

    By default, the C1MediaPlayer control doesn't show the chapter list when it's loaded; users will have to open the list themselves by clicking the Chapter List button. However, you can make the chapter list show upon page load by setting the C1MediaPlayer.IsChapterListVisible property to True.

    At Design Time

    To open the chapter list on page load, complete the following steps:

    1. Click the C1MediaPlayer control once to select it.
    2. In the Properties window (or Properties panel in Blend), locate the IsChapterListVisible check box and then select it. 
    3. Run the program and observe that the chapter list opens at run time. 

    In XAML

    To open the chapter list on page load, complete the following steps:

    1. Add IsChapterListVisble="True" to the <c1mediaplayer:C1MediaPlayer> tag so that the markup resembles the following:
       <c1mediaplayer:C1MediaPlayer Name="C1MediaPlayer1" IsChapterListVisible="True">
      
    2. Run the program and observe that the chapter list opens at run time.

    In Code

    To open the chapter list on page load, complete the following steps:

    1. Open the Window1.xaml.cs page.
    2. Add x:Name="C1MediaPlayer1" to the <c1ext:C1MediaPlayer> tag so that the control will have a unique identifier for you to call in code. 
    3. Place the following code beneath the InitializeComponent() method:        
      Visual Basic
      Copy Code
      C1MediaPlayer1.IsChapterListVisible = True
      

       

      C#
      Copy Code
      c1MediaPlayer1.IsChapterListVisible = true;
      

       

    4. Run the program and observe that the chapter list opens at run time.