ComponentOne MediaPlayer for WPF and Silverlight
C1MediaPlayer Task-Based Help / Creating Chapters
In This Topic
    Creating Chapters
    In This Topic

    You can create chapters by creating a C1MediaChapter item and then settings its C1MediaChapter.Position property. This topic assumes that you have completed the Adding Media Content task-based help topic.

    At Design Time (Visual Studio)

    To create a chapter, complete the following steps:

    1. Click the C1MediaPlayer control once to select it.
    2. In the Properties window, click the Items property's ellipsis button Ellipsis.png. The Collection Editor: Items dialog box opens.
    3. In the Items pane, select the C1MediaItem that you want to add the chapters to.
    4. In the Properties pane, click the C1MediaItem.Chapters property's ellipsis button Ellipsis.png. The Collection Editor: Chapters dialog box opens.
    5. Create a chapter by completing the following steps:        
      1. Click Add to add a chapter. A C1MediaChapter item is added to the Items pane.
      2. Set the C1MediaChapter.Position property to a time. For this example, set it to "00:01:25", which will create the chapter at 1 minute and 25 seconds into media file. 
      3. Set the C1MediaChapter.Title property to a name. For this example, set it to "Trevor Looks Confused".
    6. Click OK to close the Collection Editor: Chapters dialog box.
    7. Click OK to close the Collection Editor: Items dialog box.
    8. Run the program and click the Chapter List button . Observe that one chapter, Trevor Looks Confused, appears in the list. You can double-click it to skip ahead to that part of the media file.

    At Design Time (Blend)

    To create a chapter, complete the following steps:

    1. Click the C1MediaPlayer control once to select it.
    2. Under the Properties panel, locate the Items property and click its ellipsis button (…). The C1MediaItem Collection Editor: Items dialog box opens.
    3. In the Items pane, select the C1MediaItem that you want to add the chapters to.
    4. In the Properties pane, find the C1MediaItem.Chapters property and click its ellipsis button. The C1MediaItem Collection Editor: Chapters dialog box opens.
    5. Create a chapter by completing the following steps:
      1. Click Add Another Item to add a chapter.
      2. A C1MediaChapter item is added to the Items pane.
      3. Set the C1MediaChapter.Position property to a time. For this example, set it to "00:01:25", which will create the chapter at 1 minute and 25 seconds into media file. 
      4. Set the C1MediaChapter.Title property to a name. For this example, set it to "Trevor Looks Confused".
      5. Click OK to close the C1MediaItem Collection Editor: Chapters dialog box.
    6. Click OK to close the C1MediaItem Collection Editor: Items dialog box.
    7. Run the program and click the Chapter List button . Observe that one chapter, Trevor Looks Confused, appears in the list. You can double-click it to skip ahead to that part of the media file.

    In XAML

    To create a chapter, complete the following steps:

    1. Place the following markup between the <c1mediaplayer:C1MediaItem>and the </c1mediaplayer:C1MediaItem> tags:

      XAML
      Copy Code
      <c1mediaplayer:C1MediaChapter Name="C1MediaPlayer1"  Position="00:01:25" Title="Trevor Looks Confused"/>
      

       

    2. Run the program and click the Chapter List button . Observe that one chapter, Trevor Looks Confused, appears in the list. You can double-click it to skip ahead to that part of the media file.