How to create checkbox to custom activity such that I should be able to select from dropdown or type the required value with c#?

Hi everyone,
Can we create a Combobox in properties for custom activity such that I will be able to select one from the dropdown or I will type the required value?
I know how to get Combobox using Enum.
Screenshot (53)
something like this where we select from dropdown or type the required one.

1 Like

Hi

First create a enum variable with values and and then use the enum variable name as datatype for your drop-down

public enum test {one,two}
Public test actDropdown{get;set;}

Yes I can create dropdown but, I cannot type the required text in dropdown, only I am able to select from the dropdown.

@sai_karthik1 properties can be static (like the enum type you mentioned) or InArgument (e.g. InArgument<enumType>.

In the former case, you get a static combobox of options, like you say you have done. In the latter case, you get an edit field where you can input any expression that resolves to one of your enum values (e.g. variables, direct enum values etc.).

Can you share the code you used to define your property, along with a representation of your desired outcome?

public enum SM
    {
    	Minimize,
    	Restore
    };
public SM Op { get; set; }

This is what I have to declare an Enum and get Combobox.

Desired outcome
I need a property such that I can select from the list of options available or I can send a variable, it may or may not be through Enum.

In order to send a variable to the property, you need to have that property as an InArgument. So I guess something like public InArgument<SM> Op { get; set; }

That should also create a little dropdown button near the input field where you would input your variable or value.

@Valeriu_Prodan please correct me if Iā€™m wrong.