In This Article

TintedResourceDictionary Class

Represents a ResourceDictionary that wraps the ResourceDictionary specified in the SourceDictionary property and clones and tints its resources.

public class TintedResourceDictionary : ResourceDictionary
Inheritance:
object ResourceDictionary object

Constructors

TintedResourceDictionary()

Initializes an instance of the class.

public TintedResourceDictionary()

TintedResourceDictionary(ResourceDictionary, Color)

Initializes an instance of the class.

public TintedResourceDictionary(ResourceDictionary sourceDictionary, Color tintColor)
Parameter Type Description
sourceDictionary ResourceDictionary

The ResourceDictionary whose contents will be cloned, tinted, and placed in the MergedDictionaries collection.

tintColor Color

The default Color that is used to tint the resources.

TintedResourceDictionary(ResourceDictionary?, Color, ICollection<TintGroup>?)

Initializes an instance of the class.

public TintedResourceDictionary(ResourceDictionary? sourceDictionary, Color tintColor, ICollection<TintGroup>? tintGroups)
Parameter Type Description
sourceDictionary ResourceDictionary

The ResourceDictionary whose contents will be cloned, tinted, and placed in the MergedDictionaries collection.

tintColor Color

The default Color that is used to tint the resources.

tintGroups ICollection<TintGroup>

The collection of tint groups that will not be tinted.

Properties

SourceDictionary

The ResourceDictionary whose contents will be cloned, tinted, and placed in the MergedDictionaries collection.

public ResourceDictionary? SourceDictionary { get; set; }

Property Value

ResourceDictionary

TintColor

The default Color that is used to tint the resources.

public Color TintColor { get; set; }

Property Value

Color:

The default value is Transparent.

Remarks

If Transparent is specified, no tinting will be performed.

TintGroups

The collection of tint groups that can be referenced in the resources via the Name attached property.

public TintGroupCollection TintGroups { get; }

Property Value

TintGroupCollection

Remarks

If left unmodified, the default collection will contain a TintGroup named NoTint that prevents tinting from occurring on resources that reference it.

Inherited Members

Extension Methods