Class Skin
- Namespace
- VisioForge.Core.UI.Skins
- Assembly
- VisioForge.Core.dll
Represents a complete skin theme for the UI, containing styling information for various UI elements. Implements the VisioForge.Core.UI.Skins.ISkin interface.
public class Skin : ISkinInheritance
Implements
Inherited Members
Remarks
A skin encapsulates all visual assets needed to theme media player and capture control interfaces, including button images, slider styles, control panel layouts, and color schemes. Skins can be loaded from various sources:
- Embedded resources in assemblies (.vfskin files)
- ZIP archives containing skin elements
- File system directories with individual element files
- Byte arrays with compressed skin data
Constructors
Skin()
Initializes a new instance of the VisioForge.Core.UI.Skins.Skin class with empty element collection.
public Skin()Remarks
After construction, the skin must be populated with element data using the VisioForge.Core.UI.Skins.Skin.ParseElement(System.String,System.Byte[]) method or loaded through VisioForge.Core.UI.Skins.SkinManager utility methods.
Properties
BackgroundColor
Gets or sets the primary background color for the UI.
public SKColor? BackgroundColor { get; set; }Property Value
ButtonHoverColor
Gets or sets the fallback color applied to buttons on hover when no hover image is available.
public SKColor? ButtonHoverColor { get; set; }Property Value
PlaylistBackgroundColor
Gets or sets the background color for the playlist container.
public SKColor? PlaylistBackgroundColor { get; set; }Property Value
PlaylistItemBackgroundColor
Gets or sets the background color for individual playlist items.
public SKColor? PlaylistItemBackgroundColor { get; set; }Property Value
PlaylistTextColor
Gets or sets the text color for playlist item labels.
public SKColor? PlaylistTextColor { get; set; }Property Value
TextColor
Gets or sets the primary text color for UI labels and text elements.
public SKColor? TextColor { get; set; }Property Value
Methods
GetElement(SkinElementType)
Retrieves the skin element data for the specified UI element type.
public SkinElementData GetElement(SkinElementType element)Parameters
elementSkinElementType-
The type of UI element to retrieve skin data for.
Returns
- SkinElementData
-
A VisioForge.Core.UI.Skins.SkinElementData object containing the styling information including images for all visual states, or
nullif the element is not defined in this skin.
Remarks
If an element is not defined in the skin, controls should fall back to default styling or hide the element. The returned VisioForge.Core.UI.Skins.SkinElementData contains image data for base, hover, pressed, and disabled states, though some states may be undefined if not provided by the skin.
GetName()
Gets the display name of the skin.
public string GetName()Returns
- string
-
The skin's display name as defined in the Settings.json file within the skin package.
Remarks
This name is used for display in UI selection lists and for programmatic retrieval via VisioForge.Core.UI.Skins.SkinManager.GetSkinByName(System.String). The name should be unique across all loaded skins to avoid ambiguity.
ParseElement(string, byte[])
Parses and loads skin element data from a file.
public bool ParseElement(string name, byte[] data)Parameters
namestring-
The filename of the element resource (e.g., "Settings.json", "Play.svg", "WPFSliderStyle.xaml").
databyte[]-
The raw byte data of the element resource.
Returns
- bool
-
trueif the element was successfully parsed and loaded;falseif the element type was not recognized or parsing failed.
Remarks
This method supports multiple file types:
- Settings.json - Contains skin metadata (name, colors)
- *.svg - SVG vector graphics for UI elements
- *.png - Raster images for UI elements
- *.xaml - WPF-specific XAML templates and styles (Windows only)
- No suffix - Base/normal state
- _h - Hover state
- _p - Pressed state
- _d - Disabled state