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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copy a xpTaskBarBox object

Thread ID:





7012 Sep 9,2003 07:26 PM UTC Sep 12,2003 01:32 PM UTC WinForms 7
Tags: Tools
Asked On September 9, 2003 07:26 PM UTC

In my app, there a xpTaskBar and several xpTaskBarBox boxes inside the bar. Each box has a panel control which contains variable controls in the panel. Do you know how to make a copy of the boxes including panel and its controls? I want to do it because I would like to add a box which is a copy of the existed one into the bar at run time. Thanks

Arun Srinivasan [Syncfusion]
Replied On September 9, 2003 10:25 PM UTC

Hi Keith, The XPTaskBarBox does not implement the ICloneable interface and hence cloning it is not an option. But this is standard as most controls, (example Windows Forms TextBox control) do not implement the ICloneable interface. So what you could do is use the reference like you had in one of your earlier postings in the forums like: xpTaskBar1.Controls.Add(xpTaskBarBox1); xpTaskBar1.Controls.Add(xpTaskBarBox2); Arun

Administrator [Syncfusion]
Replied On September 9, 2003 11:44 PM UTC

Hi Keith, I have modified the existing XPTaskBarDemo sample to implement a poor workaround. Please take a look into the code attached and let me know if this what you are looking for. Regards, Guru Patwal.

Replied On September 10, 2003 01:03 PM UTC

The codes you provided works just fine. It is great if you can provide some codes that allow users drag a box and move to another position in the bar. One question is to make a copy of one of boxes then add it into the bar. The difficulty is that I don't how many controls and what kind of them in a box to be copied from.

Administrator [Syncfusion]
Replied On September 11, 2003 04:49 PM UTC

Hi Keith, Adding the drag and drop feature to a XPTaskBarBox item has been considered as a 'feature request' (QA# 281). We will do our very best to implement this feature at the earliest and include it in our future releases. Thanks for your patience. Regards, Guru Patwal.

Replied On September 11, 2003 08:17 PM UTC

how to make a copy of a box inside a bar then add it into the bar? thanks Keith

Ramesh Praveen [Syncfusion]
Replied On September 12, 2003 12:05 PM UTC

Keith, Controls in the .Net framework do not provide any support for Copying (Cloning). That's true with the XPTaskBarBoxes too. The cloning metaphor is achieved in the framework by creating a class that implements all the functionality and then creating multiple instances of that class, which would act like clones. In your case, you could have a derived XPTaskBarBox, that will initialize itself with the Panels and such and also listen to the events generated and perform the appropriate action. You could then create different instances of this type (which will look and act like Clones). Hopefully, I am clear here. Regards, Praveen Ramesh

Replied On September 12, 2003 01:32 PM UTC

You are right. There is no way to copy a box in a bar.. Thanks Keith


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon