2009-01-22 72 views
1

我用下面的XAML代碼填寫在DataContext:「屬性‘路徑’沒有價值」

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

應用程序工作正常,但蘋果酒抱怨說,我必須設置Path屬性。 我對整個對象感興趣,但不是特定的屬性。

我希望有一種方法可以讓設計師的支持回來!

回答

0

謝謝,這是正是我需要得到我的RD工作,修復是從:

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

到:

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