gpt4 book ai didi

wpf - xaml 嵌套类路径设计器问题

转载 作者:行者123 更新时间:2023-12-04 16:35:55 26 4
gpt4 key购买 nike

我有嵌套类

public class Enums
{
public enum WindowModeEnum { Edit, New }
}

在我的 xaml 中,我引用了代码:
<Style.Triggers>
<DataTrigger Binding="{Binding WindowMode}"
Value="{x:Static Types1:Enums+WindowModeEnum.Edit}">
<Setter Property="Visibility"
Value="Collapsed" />
</DataTrigger>
</Style.Triggers>

代码编译并正常运行,但是我无法在设计窗口中打开 xaml 代码。我收到以下错误:
Type 'Types1:Enums+WindowModeEnum' was not found.
at MS.Internal.Metadata.ExposedTypes.ValueSerializers.StaticMemberDocumentValueSerializer.ConvertToDocumentValue(ITypeMetadata type, String value, IServiceProvider documentServices)
at MS.Internal.Design.DocumentModel.DocumentTrees.Markup.XamlMarkupExtensionPropertyBase.get_Value()
at MS.Internal.Design.DocumentModel.DocumentTrees.DocumentPropertyWrapper.get_Value()
at MS.Internal.Design.DocumentModel.DocumentTrees.InMemory.InMemoryDocumentProperty..ctor(DocumentProperty property, InMemoryDocumentItem item)
at MS.Internal.Design.DocumentModel.DocumentTrees.InMemory.InMemoryDocumentItem.SetUpItem(DocumentItem item)

VS2008、VS2010 也存在同样的错误。

有没有人有任何想法,如何处理它以便我可以在设计模式下打开窗口。

非常感谢。

真挚地,
弗拉德。

最佳答案

我向微软提出了同样的问题,他们也测试了这个场景,他们承认这是他们这边的一个错误,他们会看一下。

关于wpf - xaml 嵌套类路径设计器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2952518/

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