Class SkinManager
Implementation of ISkinManager. Manages the color and layout definitions of the skins.
Inheritance
Implements
Namespace: Sartorius.SAF.Presentation.Skins
Assembly: Sartorius.SAF.Presentation.dll
Syntax
[Export(typeof(ISkinManager))]
public class SkinManager : ISkinManager
Properties
View SourceDefaultSkinLoaded
Indicates whether the default skin is loaded.
Declaration
public static bool DefaultSkinLoaded { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
SkinColors
Gets or sets the list of colors.
Declaration
[ImportMany(typeof(ISkinColor))]
public List<ISkinColor> SkinColors { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ISkinColor> |
Remarks
This list should be imported via MEF in the ISkinManager implementation.
SkinLayouts
Gets or sets the list of layouts.
Declaration
[ImportMany(typeof(ISkinLayout))]
public List<ISkinLayout> SkinLayouts { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<ISkinLayout> |
Remarks
This list should be imported via MEF in the ISkinManager implementation.
Methods
View SourceApplySkin(String, String)
Applies the skins of the given id's to the Application.Current.Resources.
Declaration
public void ApplySkin(string layoutId, string colorId)
Parameters
Type | Name | Description |
---|---|---|
System.String | layoutId | The id of the SkinLayout implementation. |
System.String | colorId | The id of the SkinColor implementation. |
Remarks
The skins are merged first (in the correct order) and then applied.
MergeResources(ResourceDictionary, String, String)
Merges the skins of the given id's with the given resourceDictionary.
Declaration
public void MergeResources(ResourceDictionary resourceDictionary, string layoutId, string colorId)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.ResourceDictionary | resourceDictionary | The resourceDictionary the skins should be merged with |
System.String | layoutId | The id of the SkinLayout implementation. |
System.String | colorId | The id of the SkinColor implementation. |
TryApplyDefaultSkin(IConfigurationRoot)
Applies the default skins defined in the app.config of the application
Declaration
public void TryApplyDefaultSkin(IConfigurationRoot configurationRoot)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Configuration.IConfigurationRoot | configurationRoot |
Remarks
app.config keys in the appSettings are DefaultSkinColor and DefaultSkinLayout