Show / Hide Table of Contents

Class SkinManager

Implementation of ISkinManager. Manages the color and layout definitions of the skins.

Inheritance
System.Object
SkinManager
Implements
ISkinManager
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Skins
Assembly: Sartorius.SAF.Presentation.dll
Syntax
[Export(typeof(ISkinManager))]
public class SkinManager : ISkinManager

Properties

View Source

DefaultSkinLoaded

Indicates whether the default skin is loaded.

Declaration
public static bool DefaultSkinLoaded { get; }
Property Value
Type Description
System.Boolean
View Source

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.

View Source

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 Source

ApplySkin(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.

View Source

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.

View Source

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

Implements

ISkinManager

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX