开发者

Slider in WPF Dependency Property

开发者 https://www.devze.com 2023-01-04 21:48 出处:网络
I\'m trying to set the Value of the Slider to 1.0 but whe开发者_开发知识库n in debugger, I can see that after the assignment like:

I'm trying to set the Value of the Slider to 1.0 but whe开发者_开发知识库n in debugger, I can see that after the assignment like:

surfaceSlider.Value = 1.0;

the value stays at the current value (0.0).

Any ideas why I can't set that dependency property?


WPF Slider Value property is dependency property, this will accept the values.

I think you are creating a custom control with a dependency property named "Value". Make sure your setter property is public and OwnerType is your class.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号