Table of Contents

Class SkinPlaylistItem

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

Represents a single item in a skinnable playlist control. This UserControl displays media information including filename, thumbnail image, and provides visual feedback for selection state and user interaction.

public class SkinPlaylistItem : UserControl, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, IComponentConnector

Inheritance

Implements

Inherited Members

Remarks

The SkinPlaylistItem control provides the following functionality:

  • Display of media filename and optional thumbnail image
  • Visual selection state with margin adjustments
  • Skin-based color theming for text and background
  • Mouse interaction for item selection
  • Integration with parent playlist for coordinated selection management

The control uses data binding to display its properties and automatically updates its appearance based on the active skin settings.

Constructors

SkinPlaylistItem()

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

public SkinPlaylistItem()

Fields

SkinNameProperty

The skin name property.

public static readonly DependencyProperty SkinNameProperty

Field Value

DependencyProperty

Properties

BackgroundColor

Gets or sets the brush used for background color in the playlist item.

public Brush BackgroundColor { get; set; }

Property Value

Brush

Remarks

This property is automatically updated based on the active skin's PlaylistItemBackgroundColor setting and is bound to background elements in the template.

Filename

Gets or sets the filename or display name of the media item.

public string Filename { get; set; }

Property Value

string

Remarks

This property is typically bound to the UI to display the media item's name or path. It's also used as the identifier when the item is selected.

Image

Gets or sets the thumbnail image displayed for this media item.

public BitmapSource Image { get; set; }

Property Value

BitmapSource

Remarks

This property is used to display a thumbnail or preview image for the media item. It's typically bound to an Image control in the XAML template.

SkinName

Gets or sets the name of the skin.

public string SkinName { get; set; }

Property Value

string

TextColor

Gets or sets the brush used for text color in the playlist item.

public Brush TextColor { get; set; }

Property Value

Brush

Remarks

This property is automatically updated based on the active skin's PlaylistTextColor setting and is bound to text elements in the template.

Methods

AttachPlaylist(SkinPlaylist)

Attaches this item to a parent playlist control for coordinated selection management.

public void AttachPlaylist(SkinPlaylist playlist)

Parameters

playlist SkinPlaylist

The parent SkinPlaylist control that manages this item.

Remarks

This method establishes the parent-child relationship needed for the item to communicate with its parent playlist during selection operations.

InitializeComponent()

InitializeComponent

public void InitializeComponent()

Select()

Selects this playlist item and updates its visual state.

public void Select()

Remarks

This method changes the item's margin to indicate selection state and raises the OnSelected event to notify listeners of the selection.

Unselect()

Unselects this playlist item and resets its visual state.

public void Unselect()

Remarks

This method changes the item's margin back to the default state to indicate it is no longer selected.

OnSelected

Occurs when this playlist item is selected by the user.

public event EventHandler<string> OnSelected

Event Type

EventHandler<string>

Remarks

This event is raised when the user clicks on the item, providing the filename as the event argument for the parent playlist to handle.