DevExpress 控件升级后自定义 WPF 控件不再可见

发布于 2024-10-05 20:23:52 字数 520 浏览 1 评论 0原文

上下文
我编写了一个继承TreeView 控件的TreeList/TreeGrid(即带列的树)控件。我在两个不同的 DLL 中引用此控件,并在每个 DLL 中设置不同的样式。 DLL 'A' 中包含 TreeList 控件,DLL 'B' 引用 DLL 'A' 来获取 TreeList 控件。

问题
我刚刚升级了我的应用程序以使用新的 DevExpress WPF 控件 (v2010.2)。自从我升级后,DLL“B”中的 TreeList 控件不再可见,而 DLL“A”中的控件可见并且工作正常。我使用 Snoop 来查看控件是否确实存在,并且它确实存在,并且 IsVisible 属性为 true。

当前理论
在 DevExpress 更新中,他们开始对 TreeView 控件进行主题化,而在之前的版本中他们没有这样做。所以我猜测有一些资源字典混淆了,但我不是专家,所以不知道从哪里开始调试。任何关于从哪里开始寻找的指示将不胜感激!

谢谢

Context
I have written a TreeList/TreeGrid (i.e. tree with columns) control that inherits the TreeView control. I reference this control in two different DLL's and style it differently in each of them. DLL 'A' has the TreeList control in it, and DLL 'B' references DLL 'A' for the TreeList control.

Problem
I've just upgraded my application to use the new DevExpress WPF controls (v2010.2). Ever since I upgraded, the TreeList control in DLL 'B' is no longer visible and the control in DLL 'A' is visible and working fine. I've used Snoop to see whether the control is actually there and it is, and the IsVisible property is true.

Current Theory
In the DevExpress update they've started to theme the TreeView control which they didn't do in the previous version. So I'm guessing that there is some resource dictionary mix up, but I'm no expert so don't really know where to start debugging. Any pointer as to where to begin looking would really be appreciated!

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清风疏影 2024-10-12 20:23:52

我现在已经解决了这个问题。事实证明,我已经在 DLL“A”中显式定义了树视图的控制模板,但没有在其资源字典中定义,因此 DLL“B”无法引用它。因此,在 DevExpress 升级之前,它会从某个现在不可用的 WPF DLL 中获取 TreeView 样式,或者类似的东西......

I've resolved this issue now. It turns out that I had explicitly defined the control template for a tree view in DLL 'A' but not in its resource dictionary so DLL 'B' couldn't reference it. So before the DevExpress upgrade it would have picked up the TreeView style from some WPF DLL somewhere which is now not available, or something like that....

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文