Class RadMediaChapter
Chapters gives you the ability to highlight key media content. Chapters are added to the a RadMediaItem object using its Items collection. In XAML RadMediaItem RadMediaChapter RadMediaItem Each chapter (which is a RadMediaChapter class) is defined with the following properties: Position - the exact time (in seconds) when the chapter begins Content - the content(title) of the chapter. ImageSource - url of the image with which the chapter is previewed in RadChaptersPresenter.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.MediaPlayer.dll
Syntax
[TelerikToolboxCategory("Containers")]
public class RadMediaChapter : ContentControl, ISelectable
Constructors
RadMediaChapter()
RadMediaChapter(String)
Initializes a new instance of the RadMediaChapter class.
Declaration
public RadMediaChapter(string position)
Parameters
System.String
position
The position. |
Fields
ChapterClickEvent
Occurs whenever a chapter is clicked.
Declaration
public static readonly RoutedEvent ChapterClickEvent
Field Value
RoutedEvent
|
ImageSourceProperty
Identifies the ImageSource dependency property.
Declaration
public static readonly DependencyProperty ImageSourceProperty
Field Value
System.Windows.DependencyProperty
|
IndexStringProperty
Declaration
public static readonly DependencyProperty IndexStringProperty
Field Value
System.Windows.DependencyProperty
|
IsSelectedProperty
Identifies the IsSelected dependency property.
Declaration
public static readonly DependencyProperty IsSelectedProperty
Field Value
System.Windows.DependencyProperty
|
PositionProperty
Identifies the Position dependency property.
Declaration
public static readonly DependencyProperty PositionProperty
Field Value
System.Windows.DependencyProperty
|
SelectedEvent
Identifies the Selected routed event.
Declaration
public static readonly RoutedEvent SelectedEvent
Field Value
RoutedEvent
|
TitleProperty
Identifies the Title dependency property.
Declaration
public static readonly DependencyProperty TitleProperty
Field Value
System.Windows.DependencyProperty
|
UnselectedEvent
Identifies the Unselected routed event.
Declaration
public static readonly RoutedEvent UnselectedEvent
Field Value
RoutedEvent
|
Properties
ImageSource
Gets or sets the image that will be used within the current instance of RadMediaChapter.
Declaration
public ImageSource ImageSource { get; set; }
Property Value
System.Windows.Media.ImageSource
|
Examples
<telerik:RadMediaPlayer
<telerik:RadMediaItem Source="movie1.wmv">
<telerik:RadMediaChapter
Position="00:00:20"
Title="Jump to 20 sec."
ImageSource="image1.jpg" />
<telerik:RadMediaChapter
Position="00:02:50"
Title="Jump to 2 min and 50 sec."
ImageSource="image2.jpg" />
</telerik:RadMediaItem>
</telerik:RadMediaPlayer>
RadMediaPlayer radMediaPlayer1 = new RadMediaPlayer();
LayoutRoot.Children.Add(radMediaPlayer1);
RadMediaItem mediaItem = new RadMediaItem();
mediaItem.Source = new Uri("movie1.wmv", UriKind.RelativeOrAbsolute);
RadMediaChapter chapter1 = new RadMediaChapter();
chapter1.Position = "00:00:20";
chapter1.Title = "Jump to 20sec.";
chapter1.ImageSource = new Uri("image1.jpg", UriKind.RelativeOrAbsolute);
mediaItem.Items.Add(chapter1);
RadMediaChapter chapter2 = new RadMediaChapter();
chapter2.Position = "00:02:50";
chapter2.Title = "Jump to 2min. 50sec.";
chapter2.ImageSource = new Uri("image2.jpg", UriKind.RelativeOrAbsolute);
mediaItem.Items.Add(chapter2);
radMediaPlayer1.Items.Add(mediaItem);
IndexString
Declaration
public string IndexString { get; }
Property Value
System.String
|
IsSelected
Specifies if this chapter is the currently playing.
Declaration
public bool IsSelected { get; set; }
Property Value
System.Boolean
|
Position
Gets or sets the position of RadMediaChapter. The Position property is used when the user wants to jump to a specific moment of the media item.
Declaration
public TimeSpan Position { get; set; }
Property Value
System.TimeSpan
|
Examples
<telerik:RadMediaPlayer
<telerik:RadMediaItem Source="movie1.wmv">
<telerik:RadMediaChapter
Position="00:00:20"
Title="Jump to 20 sec." />
<telerik:RadMediaChapter
Position="00:02:50"
Title="Jump to 2 min and 50 sec." />
</telerik:RadMediaItem>
</telerik:RadMediaPlayer>
RadMediaPlayer radMediaPlayer1 = new RadMediaPlayer();
LayoutRoot.Children.Add(radMediaPlayer1);
RadMediaItem mediaItem = new RadMediaItem();
mediaItem.Source = new Uri("movie1.wmv", UriKind.RelativeOrAbsolute);
RadMediaChapter chapter1 = new RadMediaChapter();
chapter1.Position = "00:00:20";
chapter1.Title = "Jump to 20sec.";
mediaItem.Items.Add(chapter1);
RadMediaChapter chapter2 = new RadMediaChapter();
chapter2.Position = "00:02:50";
chapter2.Title = "Jump to 2min. 50sec.";
mediaItem.Items.Add(chapter2);
radMediaPlayer1.Items.Add(mediaItem);
Title
Gets or sets the Title property of RadMediaChapter. The title property provides a string that will be displayed when the current RadMediaChapter is reached.
Declaration
public string Title { get; set; }
Property Value
System.String
|
Examples
<telerik:RadMediaPlayer
<telerik:RadMediaItem Source="movie1.wmv">
<telerik:RadMediaChapter
Position="00:00:20"
Title="Jump to 20 sec." />
<telerik:RadMediaChapter
Position="00:02:50"
Title="Jump to 2 min and 50 sec." />
</telerik:RadMediaItem>
</telerik:RadMediaPlayer>
RadMediaPlayer radMediaPlayer1 = new RadMediaPlayer();
LayoutRoot.Children.Add(radMediaPlayer1);
RadMediaItem mediaItem = new RadMediaItem();
mediaItem.Source = new Uri("movie1.wmv", UriKind.RelativeOrAbsolute);
RadMediaChapter chapter1 = new RadMediaChapter();
chapter1.Position = "00:00:20";
chapter1.Title = "Jump to 20sec.";
mediaItem.Items.Add(chapter1);
RadMediaChapter chapter2 = new RadMediaChapter();
chapter2.Position = "00:02:50";
chapter2.Title = "Jump to 2min. 50sec.";
mediaItem.Items.Add(chapter2);
radMediaPlayer1.Items.Add(mediaItem);
Methods
OnSelected(RadRoutedEventArgs)
Called when the RadMediaChapter is selected in a RadMediaItem.
Declaration
public void OnSelected(RadRoutedEventArgs e)
Parameters
RadRoutedEventArgs
e
The event data. |
Remarks
This method is called when the IsSelected property changes to true.
OnUnselected(RadRoutedEventArgs)
Called when the RadMediaChapter is unselected in a RadMediaItem.
Declaration
public void OnUnselected(RadRoutedEventArgs e)
Parameters
RadRoutedEventArgs
e
The event data. |
Remarks
This method is called when the IsSelected property changes to true.