public static readonly DependencyProperty EffectProperty;
public Effect Effect
{
get
return (Effect)base.GetValue(EffectProperty);
}
set
base.SetValue(EffectProperty, value);
public static Brush ImplicitInput
get;
set;
< Canvas Name ="canvas1">
< Canvas.Effect >
< BlurEffect RenderingBias ="Performance" Radius ="5" KernelType ="Gaussian"/>
</ Canvas.Effect >
public class MyEffect : ShaderEffect
public MyEffect()
this.PixelShader = _pixelShader;
private static PixelShader _pixelShader = new PixelShader()
{ UriSource = new Uri(@"pack://application:,,,/MyEffect;component/MyEffect.ps") };
public static readonly DependencyProperty ImplicitInputProperty =
ShaderEffect.RegisterPixelShaderSamplerProperty("ImplicitInput", typeof(MyEffect), 0);
public Brush ImplicitInput
get { return (Brush)GetValue(ImplicitInputProperty); }
set { SetValue(ImplicitInputProperty, value); }
UpdateShaderValue(ImplicitInputProperty);