NodeComboBoxString
The NodeComboBoxString, in contrast to NodeComboBox and NodeComboBoxEnum, allows binding to a string data property and selecting its value from a list of dropdown items.
It supports the same features as NodeComboBox, such as DropDownItems, InteractiveDropDownItems, and MaxDropDownItems, etc.
To bind NodeComboBoxString, you need:
-
Define a string data property in the node class:
-
Create a NodeComboBoxString instance, specify its dropdown list of available values to select, and bind it to the added data property.
For testing purposes, we create the node control manually in code below, but it could also be created in Visual Studio Windows Forms form's designer at design-time.
Example
After running the above code and changing the displayed 'English' value by selecting a new one from the dropdown, the PreferedLanguage property of the selected node instance will be updated accordingly.