Я вложен классXAML вложенный класс путь дизайнер проблема
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.
Есть ли у кого-нибудь идеи, как с этим бороться, поэтому я могу открыть окно в режиме разработки.
Большое спасибо.
С уважением, Vlad.
Вот ссылка Microsoft Connect на ошибку: http://connect.microsoft.com/VisualStudio/feedback/details/361509/xaml-designer-cannot-handle-typename-with-nested-classes – cplotts