Table of Contents

Class ThemeManager

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Contains a dictionary of the Themes for a Terminal.Gui application.

public class ThemeManager : IDictionary<string, ThemeScope>, ICollection<KeyValuePair<string, ThemeScope>>, IEnumerable<KeyValuePair<string, ThemeScope>>, IEnumerable
Inheritance
ThemeManager
Implements
Inherited Members

Examples

"Themes": [
{
	"Default": {
		"ColorSchemes": [
		{
		"TopLevel": {
		"Normal": {
			"Foreground": "BrightGreen",
			"Background": "Black"
		},
		"Focus": {
		"Foreground": "White",
			"Background": "Cyan"

		},
		"HotNormal": {
			"Foreground": "Yellow",
			"Background": "Black"

		},
		"HotFocus": {
			"Foreground": "Blue",
			"Background": "Cyan"
		},
		"Disabled": {
			"Foreground": "DarkGray",
			"Background": "Black"

		}
	}
}

Remarks

A Theme is a collection of settings that are named. The default theme is named "Default".

The Theme property is used to determine the currently active theme.

Properties

Count

Gets the number of elements contained in the ICollection<T>.

Instance

Class is a singleton...

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

this[string]

Gets or sets the element with the specified key.

Keys

Gets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>.

Theme

Gets or sets the currently selected theme. The value is persisted to the "Theme" property.

Themes

Holds the ThemeScope definitions.

Values

Gets an ICollection<T> containing the values in the IDictionary<TKey, TValue>.

Methods

Add(KeyValuePair<string, ThemeScope>)

Adds an item to the ICollection<T>.

Add(string, ThemeScope)

Adds an element with the provided key and value to the IDictionary<TKey, TValue>.

Clear()

Removes all items from the ICollection<T>.

Contains(KeyValuePair<string, ThemeScope>)

Determines whether the ICollection<T> contains a specific value.

ContainsKey(string)

Determines whether the IDictionary<TKey, TValue> contains an element with the specified key.

CopyTo(KeyValuePair<string, ThemeScope>[], int)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Remove(KeyValuePair<string, ThemeScope>)

Removes the first occurrence of a specific object from the ICollection<T>.

Remove(string)

Removes the element with the specified key from the IDictionary<TKey, TValue>.

TryGetValue(string, out ThemeScope)

Gets the value associated with the specified key.

Events

ThemeChanged

Event fired he selected theme has changed. application.