# Creating Chapters

## Content

You can create chapters by creating a [C1MediaChapter](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaChapter.html) item and then settings its [C1MediaChapter.Position](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaChapter.Position.html) property. This topic assumes that you have completed the [Adding Media Content](/componentone/docs/wpf/online-mediaplayer/C1MediaPlayer_Task-Based_Help/Adding_Media_Content) task-based help topic.

**At Design Time (Visual Studio)**

To create a chapter, complete the following steps:

1. Click the [C1MediaPlayer](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaPlayer.html) control once to select it.
2. In the Properties window, click the **Items** property's ellipsis button ![Ellipsis.png](https://cdn.mescius.io/document-site-files/images/35d97b39-ed23-40ca-bb1b-90a2e9178ac1/creating_chapters_files/image001.png). The **Collection Editor: Items** dialog box opens.
3. In the **Items** pane, select the [C1MediaItem](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaItem.html) that you want to add the chapters to.
4. In the **Properties** pane, click the [C1MediaItem.Chapters](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaItem.Chapters.html) property's ellipsis button ![Ellipsis.png](https://cdn.mescius.io/document-site-files/images/35d97b39-ed23-40ca-bb1b-90a2e9178ac1/creating_chapters_files/image001.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](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaChapter.html) item is added to the **Items** pane.
    2. Set the [C1MediaChapter.Position](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaChapter.Position.html) 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](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaChapter.Title.html) 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 ![](https://cdn.mescius.io/document-site-files/images/35d97b39-ed23-40ca-bb1b-90a2e9178ac1/graphics/chapterlist.png). 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](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaPlayer.html) 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](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaItem.html) that you want to add the chapters to.
4. In the **Properties** pane, find the [C1MediaItem.Chapters](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaItem.Chapters.html) 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](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaChapter.Position.html) 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](/componentone/api/wpf/online-mediaplayer/dotnet-framework-api/C1.WPF.MediaPlayer.4.6.2/C1.WPF.MediaPlayer.C1MediaChapter.Title.html) 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 ![](https://cdn.mescius.io/document-site-files/images/35d97b39-ed23-40ca-bb1b-90a2e9178ac1/graphics/chapterlist.png). 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:

    ```xml
    <c1mediaplayer:C1MediaChapter Name="C1MediaPlayer1"  Position="00:01:25" Title="Trevor Looks Confused"/>
    ```
2. Run the program and click the **Chapter List** button ![](https://cdn.mescius.io/document-site-files/images/35d97b39-ed23-40ca-bb1b-90a2e9178ac1/graphics/chapterlist.png). 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.