Hi guys,
The way to display a dropdown is with an enum. Note that when you’re creating the property, do not use InArgument<MyEnum>
as the type; just use MyEnum
.
Now say you have an enum to define regions of the world that has ap_east
, ap_south
, ap_west
, etc. The values have to be written in this ugly way with underscores instead of spaces because they’re technically keys. That doesn’t look too good in an activity though, so you can use this EnumNameConverter class to give each value a prettier label. Use it like so:
Your Enum class (mine is named Regions)
The property in your activity
The display in the properties panel
EnumNameConverter.cs (1.7 KB)