[.net] UIType Editor help

Started by
0 comments, last by raydey 14 years, 8 months ago
Hey guys, This is my first UI Type editor and I'm not too experienced with C#, so some help would be appreciated. I am in the process of creating a tree control (similar to TreeView, but it allows nodes to be any control the user wants). I've got a Nodes property in my control and decided to do a modal UIType Editor for it. I've got it done, all I want to know is how to save and load values using it. I'm relatively sure my returning code is correct, using the overridden EditValue function, if I understand correctly:

public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            // Access the property browser's UI display service
            IWindowsFormsEditorService editorService =
                (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            if (editorService != null)
            {
                ExTreeNodeEditorForm treeNodeEditorForm = new ExTreeNodeEditorForm();


                // Display the editor
                if (editorService.ShowDialog(treeNodeEditorForm) == DialogResult.OK)
                {
                    return treeNodeEditorForm.m_Nodes;
                }
            }

            return base.EditValue(context, provider, value);

        }

I just want to know how to then load the returned values when I next load up my UIType Editor. I hope that made at least a bit of sense. Any help is greatly appreciated. Cheers Ray
Advertisement
Never mind, figured it out

This topic is closed to new replies.

Advertisement