TintGroup Class
Represents a group that can be referenced via the Name attached property on Brush and Pen resources to apply non-default tint-colors.
public class TintGroup
- Inheritance:
- object object
Remarks
This class is intended to be used with the TintedResourceDictionary for the purposes of tinting Brush and Pen resources.
Specify a TintColor of Transparent (the default) to prevent resources that reference this group from being tinted.
Constructors
TintGroup()
Initializes an instance of the class.
public TintGroup()
TintGroup(string?, Color)
Initializes an instance of the class.
public TintGroup(string? name, Color tintColor)
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the tint group. |
| tintColor | Color | The Color that is used to tint the resources that reference this TintGroup. |
TintGroup(string?, Color, IEnumerable<object>?)
Initializes an instance of the class.
public TintGroup(string? name, Color tintColor, IEnumerable<object>? excludedKeys)
| Parameter | Type | Description |
|---|---|---|
| name | string | The name of the tint group. |
| tintColor | Color | The Color that is used to tint the resources that reference this TintGroup. |
| excludedKeys | IEnumerable<object> | The keys to exclude from tinting. |
Properties
ExcludedKeys
The collection of excluded keys.
Name
The name of the tint group, that can be referenced by resources using the Name attached property.
TintColor
public Color TintColor { get; set; }
Property Value
- Color:
The default value is Transparent.
Remarks
If Transparent is specified, no tinting will be performed.
Methods
GetName(DependencyObject)
Gets the value of the Name attached property for the specified object.
public static string GetName(DependencyObject obj)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object from which the property value is read. |
Returns
SetName(DependencyObject, string)
Sets the value of the Name attached property to the specified object.
public static void SetName(DependencyObject obj, string value)
| Parameter | Type | Description |
|---|---|---|
| obj | DependencyObject | The object to which the attached property is written. |
| value | string | The value to set. |
Fields
NoTint
Represents an immutable tint group that is not tinted.
public static readonly TintGroup NoTint
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()