gpt4 book ai didi

wpf - 在 ObjectDataProvider 标记中引用嵌套类型

转载 作者:行者123 更新时间:2023-12-04 07:04:44 27 4
gpt4 key购买 nike

我正在尝试在我的 ObjectDataSource 中使用嵌套类型 this文章。它似乎对我不起作用。

<ObjectDataProvider x:Key="myProvider" ObjectType="{x:Type local:OutsideClass+InsideClass}" MethodName="GetObjects" />

最佳答案

这是 VS 2008 及更高版本中的已知问题。 Microsoft's official position is that you shouldn't be doing this :

Whilst the XAML you are writing is clearly legal, works at runtime, and loads in correctly in Expression Blend, we do not currently believe that use of and access to nested classes from Markup Extensions is very common in application building.

关于wpf - 在 ObjectDataProvider 标记中引用嵌套类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1295913/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com