Inheritance: System.Windows.Markup.MarkupExtension, IValueConverter
Ejemplo n.º 1
0
 /// <summary>
 /// When implemented in a derived class, returns an object that is set as the value of the target property for this markup extension.
 /// </summary>
 /// <returns>
 /// The object value to set on the property where the extension is applied.
 /// </returns>
 /// <param name="serviceProvider">Object that can provide services for the markup extension.</param>
 public override object ProvideValue(IServiceProvider serviceProvider)
 {
     return(instance ?? (instance = new ConvertColorToBrush()));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// When implemented in a derived class, returns an object that is set as the value of the target property for this markup extension. 
 /// </summary>
 /// <returns>
 /// The object value to set on the property where the extension is applied. 
 /// </returns>
 /// <param name="serviceProvider">Object that can provide services for the markup extension.</param>
 public override object ProvideValue(IServiceProvider serviceProvider)
 {
     return instance ?? (instance = new ConvertColorToBrush());
 }