Table of Contents

Class SkinPlaylist

Namespace
VisioForge.Core.UI.WPF.Skins
Assembly
VisioForge.Core.dll

A skinnable playlist control that provides media item management and playback queue functionality. This control displays a list of media items, allows for item selection, and integrates with the media player for seamless playback control.

public class SkinPlaylist : Grid, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild

Inheritance

Implements

Inherited Members

Remarks

The SkinPlaylist control provides the following functionality:

  • Dynamic playlist item management with add/remove operations
  • Visual feedback for selected items and playback state
  • Integration with the skinning system for customizable appearance
  • Automatic item highlighting and selection management
  • Integration with media player controls for seamless playback

The control uses a StackPanel layout to display playlist items vertically and supports mouse interaction for item selection and playback control.

Constructors

SkinPlaylist()

Initializes a new instance of the VisioForge.Core.UI.WPF.Skins.SkinPlaylist class.

public SkinPlaylist()

Fields

SkinNameProperty

The skin name property.

public static readonly DependencyProperty SkinNameProperty

Field Value

DependencyProperty

Properties

BackgroundColor

Gets or sets the color of the background.

public Brush BackgroundColor { get; set; }

Property Value

Brush

SkinName

Gets or sets the name of the skin.

public string SkinName { get; set; }

Property Value

string

Methods

AddFile(string)

Adds a new media file to the playlist.

public void AddFile(string filename)

Parameters

filename string

The filename or URL of the media file to add to the playlist.

Remarks

This method creates a new playlist item, applies the current skin styling, and adds it to the playlist display. The item becomes available for playback once added to the queue.

AttachPlayer(IMediaPlayerControls)

Attaches a media player interface to enable playlist integration with playback control.

public void AttachPlayer(IMediaPlayerControls player)

Parameters

player IMediaPlayerControls

The media player interface that will be controlled by the playlist.

Remarks

This method establishes the connection between the playlist and the media player, enabling the playlist to control playback operations when items are selected.

AttachPlayerControls(SkinPlayerControls)

Attaches player controls to enable integrated UI management.

public void AttachPlayerControls(SkinPlayerControls playerControls)

Parameters

playerControls SkinPlayerControls

The player controls interface for coordinated UI updates.

Remarks

This method connects the playlist with the player controls UI, enabling synchronized updates between playlist selection and player control state.

GetNext()

Retrieves the next item in the playlist after the currently selected item.

public SkinPlaylistItem GetNext()

Returns

SkinPlaylistItem

The next playlist item, or null if there is no next item or no selection.

Remarks

This method implements forward navigation through the playlist, returning the item that follows the currently selected one. Returns null when reaching the end of the playlist or if no item is selected.

GetPrevious()

Retrieves the previous item in the playlist before the currently selected item.

public SkinPlaylistItem GetPrevious()

Returns

SkinPlaylistItem

The previous playlist item, or null if there is no previous item or no selection.

Remarks

This method implements backward navigation through the playlist, returning the item that precedes the currently selected one. Returns null when at the beginning of the playlist or if no item is selected.

PlayNext()

Advances to and plays the next item in the playlist.

public void PlayNext()

Remarks

This method combines navigation and playback by finding the next item in the queue and automatically selecting it for playback. No action is taken if there is no next item available.

PlayPrevious()

Goes back to and plays the previous item in the playlist.

public void PlayPrevious()

Remarks

This method combines navigation and playback by finding the previous item in the queue and automatically selecting it for playback. No action is taken if there is no previous item available.

SelectItem(SkinPlaylistItem)

Selects a specific playlist item and updates the visual selection state.

public void SelectItem(SkinPlaylistItem item)

Parameters

item SkinPlaylistItem

The playlist item to select.

Remarks

This method ensures only one item is selected at a time by first unselecting all items, then applying the selected state to the specified item for clear visual feedback.

UnselectAll()

Removes the selection state from all items in the playlist.

public void UnselectAll()

Remarks

This method iterates through all playlist items and ensures none are marked as selected, providing a clean slate for new selections or clearing the playlist state.