Class SkinLoader
- Namespace
- VisioForge.Core.UI.WPF.Skins
- Assembly
- VisioForge.Core.dll
Provides methods for loading WPF UserControls from skin XAML data. This static class is responsible for creating WPF controls from XAML content stored in skin files, enabling dynamic UI generation based on skin definitions.
public static class SkinLoaderInheritance
Inherited Members
Remarks
The SkinLoader class handles the creation of various UI components from skin data:
- Player controls for media playback interfaces
- Capture controls for video capture interfaces
- Playlist controls for media library interfaces
All methods use XamlReader to parse XAML content from memory streams, allowing for dynamic UI generation at runtime based on the active skin. Error handling is included to gracefully handle invalid XAML data.
Methods
LoadCaptureControls(Skin)
Loads WPF capture controls from skin XAML data.
public static UserControl LoadCaptureControls(Skin skin)Parameters
skinSkin-
The skin instance containing the WPFCaptureControls XAML data.
Returns
- UserControl
-
A UserControl containing the loaded capture interface, or null if the skin doesn't contain capture controls XAML or if loading fails.
Remarks
This method creates a complete capture control interface from XAML data stored in the skin file. The resulting UserControl typically contains buttons and controls needed for video capture operations such as record, stop, and settings.
The method will log a debug message if the skin doesn't contain the required XAML data and return null, allowing calling code to handle the absence gracefully.
LoadPlayerControls(Skin)
Loads WPF player controls from skin XAML data.
public static UserControl LoadPlayerControls(Skin skin)Parameters
skinSkin-
The skin instance containing the WPFPlayerControls XAML data.
Returns
- UserControl
-
A UserControl containing the loaded player interface, or null if the skin doesn't contain player controls XAML or if loading fails.
Remarks
This method creates a complete player control interface from XAML data stored in the skin file. The resulting UserControl typically contains buttons, sliders, and other UI elements needed for media playback control.
The method will log a debug message if the skin doesn't contain the required XAML data and return null, allowing calling code to handle the absence gracefully.
LoadPlaylist(Skin)
Loads WPF playlist controls from skin XAML data.
public static UserControl LoadPlaylist(Skin skin)Parameters
skinSkin-
The skin instance containing the WPFPlaylist XAML data.
Returns
- UserControl
-
A UserControl containing the loaded playlist interface, or null if the skin doesn't contain playlist XAML or if loading fails.
Remarks
This method creates a complete playlist control interface from XAML data stored in the skin file. The resulting UserControl typically contains a list view or similar container for displaying and managing media items in a playlist.
The method will log a debug message if the skin doesn't contain the required XAML data and return null, allowing calling code to handle the absence gracefully.