xaml nested class path designer issue
Posted
by Vlad Bezden
on Stack Overflow
See other posts from Stack Overflow
or by Vlad Bezden
Published on 2010-06-01T19:08:03Z
Indexed on
2010/06/16
17:32 UTC
Read the original article
Hit count: 407
Hi,
I have nested class
public class Enums
{
public enum WindowModeEnum { Edit, New }
}
In my xaml I reference code:
<Style.Triggers>
<DataTrigger Binding="{Binding WindowMode}"
Value="{x:Static Types1:Enums+WindowModeEnum.Edit}">
<Setter Property="Visibility"
Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
Code compiles and runs properly, however I can't open xaml code in design window. I am getting following error:
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)
Same error exist in VS2008, VS2010.
Does anybody has any idea, how to deal with it so I can open window in design mode.
Thanks a lot.
Sincerely, Vlad.
© Stack Overflow or respective owner