TintedResourceDictionary Class
Represents a ResourceDictionary that wraps the ResourceDictionary specified in the SourceDictionary property and clones and tints its resources.
public class TintedResourceDictionary : ResourceDictionary, IDictionary, ICollection, IEnumerable, ISupportInitialize, IUriContext, INameScope
- Inheritance:
- Object ResourceDictionary Object
Constructors
TintedResourceDictionary()
Initializes an instance of the TintedResourceDictionary
class.
public TintedResourceDictionary()
TintedResourceDictionary(ResourceDictionary, Color)
Initializes an instance of the TintedResourceDictionary
class.
public TintedResourceDictionary(ResourceDictionary sourceDictionary, Color tintColor)
Parameter | Type | Description |
---|---|---|
sourceDictionary | ResourceDictionary | The ResourceDictionary whose contents will be cloned, tinted, and placed in the |
tintColor | Color | The default Color that is used to tint the resources. |
TintedResourceDictionary(ResourceDictionary, Color, ICollection<TintGroup>)
Initializes an instance of the TintedResourceDictionary
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 |
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
Gets or sets the ResourceDictionary whose contents will be cloned, tinted, and placed
in the MergedDictionaries
collection.
public ResourceDictionary SourceDictionary { get; set; }
Property Value
- ResourceDictionary:
The ResourceDictionary whose contents will be cloned, tinted, and placed in the
MergedDictionaries
collection.
TintColor
Gets or sets the default Color that is used to tint the resources.
public Color TintColor { get; set; }
Property Value
- Color:
The default Color that is used to tint the resources. The default value is
Colors.Transparent
.
Remarks
If Colors.Transparent
is specified, no tinting will be performed.
TintGroups
Gets the collection of tint groups that can be referenced in the resources via the Name attached property.
public TintGroupCollection TintGroups { get; }
Property Value
- TintGroupCollection:
The collection of tint groups that can be referenced in the resources via the Name attached property.
Remarks
If left unmodified, the default collection will contain a TintGroup named NoTint
that
prevents tinting from occurring on resources that reference it.