开发者

adding my own control to the toolbox

开发者 https://www.devze.com 2023-02-11 17:23 出处:网络
Does anyone know why I can\'t add a subclass that inherits a control from AjaxControlToolKit to the ToolKit? I explicitly implemented IComponent which I didn\'t really have to since the ICont开发者_如

Does anyone know why I can't add a subclass that inherits a control from AjaxControlToolKit to the ToolKit? I explicitly implemented IComponent which I didn't really have to since the ICont开发者_如何学Crol in the parent implements IComponent already. I'll compile the code, and try to add the DLL but I get the "doesn't contain any controls" error. I know this is a very specific error so there wasn't much help elsewhere.

[System.ComponentModel.DesignerCategory("Component"),
ToolboxData("<{0}:TabPanelWithDataBinding runat=server></{0}:TabPanelWithDataBinding>")]
public class TabPanelWithDataBinding : TabPanel, IComponent, IDisposable
{
//all the meat stuff
}


Because your base class "TabPanel" has an attribute [ToolboxItem(false)]. Which does filter the control from the assembly. You can try adding this attribute to your control with true as argument.

0

精彩评论

暂无评论...
验证码 换一张
取 消