How to bind in XAML to a static property?

前端 未结 3 848
挽巷
挽巷 2021-01-25 02:47

I am trying to bind a static property of a different class to the Text Property of a TextBlock and can get the binding to work, but there\'s is no update to the Text Property wh

3条回答
  •  自闭症患者
    2021-01-25 03:25

    Binding to static property is a problem (and unavailable in WPF) becuse of change notification (implementing INotifyPropertyChanged for static properties). Binding to static property will be introduced in WPF 4.5 (you can check it by installing .NET 4.5 Developer Preview). More details about it can be found here.

提交回复
热议问题