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:
- Click the C1MediaPlayer control once to select it.
- In the Properties window, click the Items property's ellipsis button . The Collection Editor: Items dialog box opens.
- In the Items pane, select the C1MediaItem that you want to add the chapters to.
- In the Properties pane, click the C1MediaItem.Chapters property's ellipsis button . The Collection Editor: Chapters dialog box opens.
- Create a chapter by completing the following steps:
- Click Add to add a chapter. A C1MediaChapter item is added to the Items pane.
- 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.
- Set the C1MediaChapter.Title property to a name. For this example, set it to "Trevor Looks Confused".
- Click OK to close the Collection Editor: Chapters dialog box.
- Click OK to close the Collection Editor: Items dialog box.
- 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:
- Click the C1MediaPlayer control once to select it.
- Under the Properties panel, locate the Items property and click its ellipsis button (…). The C1MediaItem Collection Editor: Items dialog box opens.
- In the Items pane, select the C1MediaItem that you want to add the chapters to.
- In the Properties pane, find the C1MediaItem.Chapters property and click its ellipsis button. The C1MediaItem Collection Editor: Chapters dialog box opens.
- Create a chapter by completing the following steps:
- Click Add Another Item to add a chapter.
- A C1MediaChapter item is added to the Items pane.
- 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.
- Set the C1MediaChapter.Title property to a name. For this example, set it to "Trevor Looks Confused".
- Click OK to close the C1MediaItem Collection Editor: Chapters dialog box.
- Click OK to close the C1MediaItem Collection Editor: Items dialog box.
- 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:
- 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"/>
|
- 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.