We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

derived class for xpTaskBar

After draging a xpTaskBar to a form, a link "Add Task Box" displayed at the bottom of the properties window. Clicking it will add a box into the bar with codes in the form defination private Syncfusion.Windows.Forms.Tools.XPTaskBar xpTaskBar1; private Syncfusion.Windows.Forms.Tools.XPTaskBarBox xpTaskBarBox1; and other codes in the InitializeComponent() If I create class a control libery and inhert your XPTaskBar and XPTaskBarBox classes in the libery e.g. public myBar:XPTaskBar { ....} public myBox:XPTaskBarBox {....} Then compile it. Create a new Window app and add the control into toolbox. After draging the control to a form and clicking "Add Task Box" link, I will get codes in the form class defination private MyNameSpace.MyBar myBar1; private Syncfusion.Windows.Forms.Tools.XPTaskBarBox xpTaskBarBox1; Why did I get myBar1 from my bar class and xpTaskBarBox1 from your XPTaskBarBox? I want to get both from my derived classes. How to change designer or write a designer to override yours to achieve it? Thanks

1 Reply

AS Arun Srinivasan Syncfusion Team September 12, 2003 07:05 PM UTC

Hi Keith You need to use DefaultChildTypeAttribute attibute. You can specify the new default child type using this attribute on your parent type, in this case myBox instead of the default XPTaskBarBox. Arun

Live Chat Icon For mobile
Up arrow icon