C# Class Orchestra.ThemeHelper

Mostra file Open project: WildGums/Orchestra Class Usage Examples

Public Methods

Method Description
CreateAccentColorResourceDictionary ( Color color ) : System.Windows.ResourceDictionary

Creates the accent color resource dictionary and automatically adds it to the application resources.

EnsureApplicationThemes ( Assembly assembly, bool createStyleForwarders = false ) : void

Ensures the application themes by using the assembly and the /Themes/Generic.xaml.

EnsureApplicationThemes ( string resourceDictionaryUri, bool createStyleForwarders = false ) : void

Ensures the application themes.

GetAccentColor ( AccentColorStyle colorStyle = AccentColorStyle.AccentColor ) : Color
GetAccentColorBrush ( ) : SolidColorBrush
GetAccentColorBrush ( AccentColorStyle colorStyle ) : SolidColorBrush
GetAccentColorResourceDictionary ( ) : System.Windows.ResourceDictionary

Gets the accent color resource dictionary if it has been created.

Private Methods

Method Description
EnsureOrchestraTheme ( bool createStyleForwarders ) : void

Ensures the orchestra theme.

Method Details

CreateAccentColorResourceDictionary() public static method

Creates the accent color resource dictionary and automatically adds it to the application resources.
public static CreateAccentColorResourceDictionary ( Color color ) : System.Windows.ResourceDictionary
color Color
return System.Windows.ResourceDictionary

EnsureApplicationThemes() public static method

Ensures the application themes by using the assembly and the /Themes/Generic.xaml.
The is null.
public static EnsureApplicationThemes ( Assembly assembly, bool createStyleForwarders = false ) : void
assembly System.Reflection.Assembly The assembly.
createStyleForwarders bool if set to true, style forwarders will be created.
return void

EnsureApplicationThemes() public static method

Ensures the application themes.
The is null or whitespace.
public static EnsureApplicationThemes ( string resourceDictionaryUri, bool createStyleForwarders = false ) : void
resourceDictionaryUri string The resource dictionary.
createStyleForwarders bool if set to true, style forwarders will be created.
return void

GetAccentColor() public static method

public static GetAccentColor ( AccentColorStyle colorStyle = AccentColorStyle.AccentColor ) : Color
colorStyle AccentColorStyle
return Color

GetAccentColorBrush() public static method

public static GetAccentColorBrush ( ) : SolidColorBrush
return System.Windows.Media.SolidColorBrush

GetAccentColorBrush() public static method

public static GetAccentColorBrush ( AccentColorStyle colorStyle ) : SolidColorBrush
colorStyle AccentColorStyle
return System.Windows.Media.SolidColorBrush

GetAccentColorResourceDictionary() public static method

Gets the accent color resource dictionary if it has been created.
public static GetAccentColorResourceDictionary ( ) : System.Windows.ResourceDictionary
return System.Windows.ResourceDictionary