Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

VS2012 WPF Designer: d:DataContext - number of generic arguments provided doesn't equal the arity...

$
0
0

When using a class as a d:DesignInstance that exposes aKeyedCollection<TKey, TItem>, the XAML designer complains with the following warning:

The number of generic arguments provided doesn't equal the arity of the generic type definition.
Parameter name: instantiation

The problem can be reproduced with the following simple program:

<Window x:Class="Test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="clr-namespace:Test"
        mc:Ignorable="d"
        d:DataContext="{d:DesignInstance local:MyClass}"/>
namespace Test{publicpartialclassMainWindow:Window{publicMainWindow(){InitializeComponent();}}publicclassMyClass{publicKeyedCollection<string,object>SettingsModule{ get;privateset;}}}

I'm unable to provide design time shape with any class that exposes a KeyedCollection.

Any ideas what is going on here?

Thanks.





Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>