private void effectsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { BlendModeEffect effect = e.AddedItems[0] as BlendModeEffect; if (effect != null) { effect.BInput = (ImageBrush)this.Resources["imageBrushTexture"]; this.rImage.Effect = effect; } }
private void ApplyColor() { if (currentColors == null) { return; } if (modeEffect == null) { modeEffect = GetComponent <BlendModeEffect>(); } Color color = currentColors.GetColor(type); color.a = 1.0f; modeEffect.OverlayColor = color; }