Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2030
Mutiple CategorySortOrder
posted

Hello,

I am using the XamPropertyGrid to allow the enduser to customize his environment.

When I try to use multiple CategorySortOrder entries I receive an exception: System.ArgumentException: Das Element wurde bereits hinzugefügt. Schlüssel im Wörterbuch: "Infragistics.Controls.Editors.CategorySortOrderAttribute". Hinzuzufügender Schlüssel: "Infragistics.Controls.Editors.CategorySortOrderAttribute".

Means: Key was already added.

Maybe I missunderstand the purpose of this attribute, but I guess it should allow multiple entries, because it's only usefull when you have multiple categories. The documentation leads me into the same direction.

Here is a small part of the class:

[CategorySortOrder("AutoStart", 1)]
[CategorySortOrder("Mengenressourcen", 2)]
// CategorySortOrder funktioniert nicht, weil das gleiche Element mehrfach hinzugefügt wird
public sealed class UserConfig : ApplicationSettingsBase
{
	[PropertySortOrder(1), Category("Baustellen"), Description("Die Adressdaten Strasse, Postleitzahl, Ort und die Koordinaten werden ein- bzw. ausgeblendet."), DisplayName("Adressdaten anzeigen"), DefaultSettingValue("False"), UserScopedSetting]
	public bool BaustelleAdressdaten
	{
		get{return (bool)this["BaustelleAdressdaten"];}
		set{this["BaustelleAdressdaten"] = value;}
	}
}

Thanks

Nikolaus Kern
Parents Reply Children