Let's say I have a custom activity that has a dependency property of type GUID.
I want in my custom designer to show like a combobox (or my own usercontrol) with possible values to select from (the values should comes from the database).
Is this possible ?
Best Answer
You need to create a
UITypeEditor
. The following is a template for a combox editor:-On your property in the activity:-
Editor
attribute will tell the PropertyGrid that you have created a custom editor for this property.GetEditStyle
method of the Editor tells the property grid to display a drop down button on the propery value.EditValue
method.DropDownControl
method which takes a control that is to be display in the drop down area.DropDownControl
method will block until the editor serviceCloseDropDown
method is called.