“Property 'Path' does not have a value”

陌路散爱 提交于 2019-12-11 08:26:25

问题


I'm using the following xaml to fill the dataContext:

DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"

The application works fine, but Cider complains that I must set the Path property. I'm interested in the entire object, and not a specific property though.

I hope there's a way to get the designer support back!!


回答1:


Have a look at section 2.3.8.7 here (you'll need to scroll down a bit):

Visual Studio 2008 Service Pack 1 (SP1) Readme

Try changing your tag to

DataContext="{Binding RelativeSource={RelativeSource TemplatedParent},Path=.}"



回答2:


Thanks, that was just what i need to get my RD working, the fix was from:

CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"

to:

CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent},Path=.}"


来源:https://stackoverflow.com/questions/469810/property-path-does-not-have-a-value

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!