Nested Type Reference in Visual Studio 2008 XAML Designer

With the following resource definition

<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="AccountTypeValues">
    <ObjectDataProvider.MethodParameters>
        <x:Type TypeName="domain:Account+AccountType" />
    </ObjectDataProvider.MethodParameters>
</ObjectDataProvider>

the designer complains that the “Type” Account + Account Type “not found”. However, a nested type exists, and the code matches and works without problems. Because the designer believes that XAML is incorrect, it does not display a graphical representation of XAML.

What do I need to do to get the designer to recognize Account + AccountType as valid? I would really like the visual part of the designer to work.

Thanks Ben

+5
source share
1 answer

, Visual Studio. http://social.msdn.microsoft.com/forums/en-US/wpf/thread/12f3e120-e217-4eee-ab49-490b70031806/:

- {x: Foo + Bar} VS2010 Blend4. , Runtime, CompileTime, Blend 4, VS2010 WPF .

WPF.

. http://connect.microsoft.com/VisualStudio/feedback/details/361509/xaml-designer-cannot-handle-typename-with-nested-classes.

, Enum.GetValues(typeof(Account.AccountType)) ObjectDataProvider. , , enum .

+4

All Articles