I have created a UserControl which has several properties. When I add the user control in to WPF application it will display those properties in the Visual Studio Property Window.
But I have a property called UserList which is a List<String> type. That property is also displayed in the Property Window with hint text “(collection)” and button with three dots. When I click on that button it will show a dialog box, which can add some values to the UserList variable. But that part of the window is not enabled.
So how can I enable that part. Is there any special things that I have to do for my UserList property?
This is how my property definition looks:
private List<String> dataSources = new List<String>();
[Description("Users"), Category("Time Line")]
public List<string> UserList
{
get { return dataSources; }
set { dataSources = value; }
}
I have found a solution, but I think this method does not work on Lists. But any way,
Collectioncan be converted into aList.