XamlParseException Failed to assign to property. Binding not working with attached property

前端 未结 2 1398
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-12 17:40

I want to create custom text box with attached property for Windows Store app. I am following this solution. Now it uses hard coded value as property value but I want to set

2条回答
  •  长发绾君心
    2021-01-12 18:13

    This is a pretty common mistake. The problem is, binding targets cannot be CLR properties in XAML. It's just the rules. A binding source can be a CLR property, just fine. The targets simply must be dependency properties.

    We all get the error! :)

    enter image description here

    I describe the whole thing here: http://blogs.msdn.com/b/jerrynixon/archive/2013/07/02/walkthrough-two-way-binding-inside-a-xaml-user-control.aspx

    Best of luck.

提交回复
热议问题