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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With