Property of type collection


is it possible add a custom property of type string[] or List<string> to a property container (e.g. of a statement)? I expact to have a drop down box where i can select a value of a given range. Does anyone have an example?




I’m not sure what you mean but if you have a component you can use constraints in a property

for an integer property use: 1;2;3

for a string property just enter a new line.

If this is not what you want can you explain your problem with an example?


I got it,

var property = CreateProperty(typeof(string), PropertyConstraintType.AllowedValueSetOnly, "MyProperty");
property.AllowedValues.Add(new PropertyAllowedValue("Val1", "Nam1", "LocName1"));
property.AllowedValues.Add(new PropertyAllowedValue("Val2", "Nam2", "LocName1"));
property.IsVisible = true;
1 Like