ColorInterpolationExtension Class
Provides a markup extension for finding the linear Color value that is the specified percentage between the value of two Color objects.
[TypeConverter(typeof(ColorInterpolationExtension.ColorInterpolationExtensionConverter))]
public class ColorInterpolationExtension : MarkupExtension
- Inheritance:
- object MarkupExtension object
Constructors
ColorInterpolationExtension()
Initializes an instance of the class.
public ColorInterpolationExtension()
ColorInterpolationExtension(Color, Color, double)
Initializes an instance of the class.
public ColorInterpolationExtension(Color color1, Color color2, double percentage)
| Parameter | Type | Description |
|---|---|---|
| color1 | Color | The first Color. |
| color2 | Color | The second Color. |
| percentage | double | The percentage from the first color towards the second. |
Properties
Color1
The first Color.
Color2
The second Color.
Percentage
The percentage from the first color towards the second.
Methods
ProvideValue(IServiceProvider)
When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.
public override object ProvideValue(IServiceProvider serviceProvider)
| Parameter | Type | Description |
|---|---|---|
| serviceProvider | IServiceProvider | A service provider helper that can provide services for the markup extension. |
Returns
- object:
The object value to set on the property where the extension is applied.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()