Custom WPF Binding

前端 未结 3 809
离开以前
离开以前 2021-01-21 02:55

I have a custom MarkupExtension that simulates binding. It works well in normal assignments but when used in Style Setters, for example:



        
3条回答
  •  猫巷女王i
    2021-01-21 03:23

    From the documentation, it looks like the object must be freezable (so they can be shared between various interested parties)

    http://msdn.microsoft.com/en-us/library/system.windows.setter.value.aspx

    "Data binding and dynamic resources within the object is supported if the specified value is a Freezable object. See Binding Markup Extension and DynamicResource Markup Extension."

提交回复
热议问题