开发者

Dynamic Drop Shadows in WPF?

开发者 https://www.devze.com 2023-01-12 18:15 出处:网络
Ok I feel like I am just missing something small here, but it has taken me too long to figure this one out.

Ok I feel like I am just missing something small here, but it has taken me too long to figure this one out.

I have a custom UserControl that has a drop shadow. This UserControl is then used as the view to create a ModelUIElement3D. The drop shadow works 开发者_JAVA百科perfectly when first displaying. The trick here is that I want to be able to change the direction of the shadow programmatically.

I have set up a binding to the ShadowDirection property that I know is working correctly, so I am left to believe that the problem lies in my view not updating. I have tried to invalidate the ModelUIElement3D, the UserControl, and the Window they all sit in, but have had no success.

Anyone know where I might be going wrong?

Thanks in advance.

Rick


Does the object to which ShadowDirection is bound implement INotifyPropertyChanged?

If not, the UI will never pick up changes from the bound object.

0

精彩评论

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

关注公众号