protected virtual Control CreateEnum(PropertyDescriptor property) { Control control; if (this.DataEntryControl.Site == null) { RadDropDownList radDropDownList = new RadDropDownList(); this.InitializeDropDownEnum((Control)radDropDownList, property); EditorInitializingEventArgs e = new EditorInitializingEventArgs(property, (Control)radDropDownList, radDropDownList.GetType()); this.OnEditorInitializing((object)this, e); if (e.Cancel) { return((Control)null); } control = e.Editor; } else { Control component = (Control)(this.designerHost.CreateComponent(typeof(RadDropDownList)) as RadDropDownList); this.InitializeDropDownEnum(component, property); EditorInitializingEventArgs e = new EditorInitializingEventArgs(property, component, component.GetType()); this.OnEditorInitializing((object)this, e); if (e.Cancel) { return((Control)null); } control = !object.ReferenceEquals((object)e.Editor, (object)component) ? this.designerHost.CreateComponent(e.EditorType) as Control : e.Editor; } if (control is RadDropDownList) { Binding binding = this.CreateBinding(control, "SelectedValue", property.Name); if (binding != null) { control.DataBindings.Add(binding); } } this.OnEditorInitialized((object)this, new EditorInitializedEventArgs(property, control, control.GetType())); return(control); }