How to bind in XAML to a static property?

前端 未结 3 817
挽巷
挽巷 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:31

    This is not currently possible, but will be in .NET 4.5: Also see "WPF 4.5 – Part 9 : binding to static properties"

    There is a workaround posted in this SO thread: Binding to static property

提交回复
热议问题