0

Custom shader properties cannot be seen on the Blend UI such as in picture below :

enter image description here

By looking at source of DropShadowEffect (which is part of WPF), animatable properties have been defined like this :

DropShadowEffect.ShadowDepthProperty = Animatable.RegisterProperty(...);

Unfortunately, Animatable.RegisterProperty method is internal what forbids doing so, the only way working is to manually code a storyboard.

Is there a way or a library that would allow to have this ability back for custom shaders ?

4

1 回答 1

0

找到问题的根源:着色器的URI不完整!

它应该是这样的:

var pixelShader = new PixelShader();
pixelShader.UriSource = new Uri(@"pack://application:,,,/YourAssembly;component/YourEffect.ps", UriKind.Absolute);

微妙:不要忘记@

参考 :

https://stackoverflow.com/a/13112241/361899

属性现在回来了:)

在此处输入图像描述

注意:不再需要所有以前的问题(动画)。

于 2013-09-10T17:13:14.853 回答