Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xaml nested class path designer issue

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.

like image 959
Vlad Bezden Avatar asked Nov 06 '22 12:11

Vlad Bezden


1 Answers

I placed the same question to Microsoft, and they tested this scenario as well, and they admited that this is a bug on their side, and they will take a look at it.

like image 100
Vlad Bezden Avatar answered Nov 09 '22 23:11

Vlad Bezden