方法或操作未实现 WPF 行为

The method or operation is not implemented WPF Behavior

我只是 运行 遇到了一个我似乎找不到答案的问题,而且我一点也不知道它是从哪里来的。

异常在运行时间弹出,包含XamDataGrid加载的插件启动后,说:

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: The method or operation is not implemented.

如果需要,我可以 post 一些代码,但是在调试时,错误发生在行为的“OnAttached”之前。

我正在使用 visual studio,没有别的。

找到问题了,错误消息与它没有任何关系。

构建日志中隐藏了一个小警告:

"Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed."

将冗长级别设置为"Diagnostic"不详细(详细一点帮助都没有),发现我的参考文献有误,其中一个项目System.Windows.Interactivity是版本4.5,在其他4.0.

我把它们都设置为 4.0,问题就解决了。

ps。我之前将它们设置为 4.5 并收到此错误

"Cannot add instance of type XamDataGrid to a collection of type 'BehaviorCollection'. Only items of type 'T' are allowed."