private void OnIconColorPropertyChanged(Color iconColor) { // For performance reason, we try to use pixel shaders effect if absolutely needed only. if (iconColor.R == byte.MaxValue && iconColor.B == byte.MaxValue && iconColor.G == byte.MaxValue) { // White more or less opaque --> setting opacity gives the expected result Effect = null; Opacity = (double)iconColor.A / byte.MaxValue; } else { Effect = new MultiplyBlendEffect { BlendColor = iconColor }; Opacity = 1.0; } OnPropertyChanged("IconColor"); }