Share via


StorableColorTheme.Item[] Property

Definition

Overloads

Item[String]

This indexer implements dictionary-like behavior using two arrays. It doesn't actually index the keys, so it's less performant than a real dictionary, but the number of entries in the collection will always be low, and (most importantly) it's easily serializable to XML.

Item[String, Color]

This indexer allows the caller to pass in a default value to be returned if the key isn't in the list.

Item[String]

This indexer implements dictionary-like behavior using two arrays. It doesn't actually index the keys, so it's less performant than a real dictionary, but the number of entries in the collection will always be low, and (most importantly) it's easily serializable to XML.

public:
 property System::Windows::Media::Color default[System::String ^] { System::Windows::Media::Color get(System::String ^ key); void set(System::String ^ key, System::Windows::Media::Color value); };
public System.Windows.Media.Color this[string key] { get; set; }
member this.Item(string) : System.Windows.Media.Color with get, set
Default Public Property Item(key As String) As Color

Parameters

key
String

The key to look up

Property Value

The value, or 'Black' if the item isn't in the collection

Applies to

Item[String, Color]

This indexer allows the caller to pass in a default value to be returned if the key isn't in the list.

public:
 property System::Windows::Media::Color default[System::String ^, System::Windows::Media::Color] { System::Windows::Media::Color get(System::String ^ key, System::Windows::Media::Color defaultColor); };
public System.Windows.Media.Color this[string key, System.Windows.Media.Color defaultColor] { get; }
member this.Item(string * System.Windows.Media.Color) : System.Windows.Media.Color
Default Public ReadOnly Property Item(key As String, defaultColor As Color) As Color

Parameters

key
String

The key to look up

defaultColor
Color

The default color to return

Property Value

A color

Applies to