2

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
  • no, it's a Windows Workflow Foundation one Commented Jul 8, 2010 at 8:42
  • How were you planning on setting the Key values? Should this be a List<string> instead? Commented Jul 8, 2010 at 11:29

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.