tags:

views:

51

answers:

1

Hello all.

I have the following custom property in my code:

public Dictionary<int, string> ServiceIdList
    {
        get
        {
            return ((Dictionary<int, string>)(GetValue(LoadSubscriptionList.ServiceIdListProperty)));
        }
        set
        {
            SetValue(LoadSubscriptionList.ServiceIdListProperty, value);
        }
    }

But the property editor for this (String Collection Editor) comes up disabled. Do I have to implement a custom UITypeEditor or can the getters and setters be improved as to provide 'hints' to the editor as to what types can be in an entry?

Thanks for any help!

+2  A: 

I found this thread that may be of help to you: http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/f2ecec70-4e44-43bb-8a09-feb8a55b365c

It appears that generic Dictionary objects do not have an editor that works with them. You'd have to derive from the CollectionEditor and override a few functions, such as CreateNewItemTypes.

rakuo15
thanks, I've implemented a custom UITypeEditor already
sardaukar