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 Colors.Transparent
(the default) to prevent resources that reference this
group from being tinted.
Constructors
TintGroup()
Initializes an instance of the TintGroup
class.
public TintGroup()
TintGroup(string, Color)
Initializes an instance of the TintGroup
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 TintGroup
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
Gets the collection of excluded keys.
public IEnumerable<object> ExcludedKeys { get; }
Property Value
- IEnumerable<object>:
The collection of excluded keys.
Name
Gets or sets the name of the tint group, that can be referenced by resources using the Name attached property.
public string Name { get; set; }
Property Value
TintColor
public Color TintColor { get; set; }
Property Value
- Color:
The Color that is used to tint the resources that reference this TintGroup. The default value is
Colors.Transparent
.
Remarks
If Colors.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
- string:
The object's value.
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 a tint group that is not tinted. This field is read-only.
public static readonly TintGroup NoTint