Example #1
0
		/// <summary>
		/// Internal Copy implementation.
		/// </summary>
		/// <param name="objCopy">Item to copy to.</param>
		protected virtual void CopyToItem(BaseItem objCopy)
		{
			objCopy.Visible=m_Visible;
			objCopy.SetIsContainer(m_IsContainer);
			objCopy.AutoExpand=m_AutoExpand;
			objCopy.BeginGroup=m_BeginGroup;
			objCopy.Enabled=m_Enabled;
			objCopy.Description=m_Description;
			objCopy.Tooltip=m_Tooltip;
			objCopy.Category=m_Category;
			objCopy.Orientation=m_Orientation;
			objCopy.Text=m_Text;
			objCopy.Name=m_Name;
			objCopy.GlobalName = m_GlobalName;
            objCopy.GlobalItem = m_GlobalItem;
			objCopy.Style=m_Style;
			objCopy.SetDesignMode(m_DesignMode);
			objCopy.ShowSubItems=m_ShowSubItems;
			objCopy.Stretch=m_Stretch;
			if(m_Shortcuts!=null && m_Shortcuts.Count>0)
				objCopy.Shortcuts.FromString(m_Shortcuts.ToString(","),",");
			
			// Copy Events
			objCopy.Click=this.Click;
			objCopy.ExpandChange=this.ExpandChange;
			objCopy.LostFocus=this.LostFocus;
			objCopy.GotFocus=this.GotFocus;
			objCopy.MouseDown=this.MouseDown;
			objCopy.MouseEnter=this.MouseEnter;
			objCopy.MouseHover=this.MouseHover;
			objCopy.MouseLeave=this.MouseLeave;
			objCopy.MouseMove=this.MouseMove;
			objCopy.MouseUp=this.MouseUp;
			objCopy.VisibleChanged=this.VisibleChanged;
			objCopy.EnabledChanged=this.EnabledChanged;
			objCopy.TextChanged=this.TextChanged;
            objCopy.IsRightToLeft = this.IsRightToLeft;
			objCopy.Cursor=m_Cursor;
			objCopy.ThemeAware=m_ThemeAware;
            objCopy.AutoCollapseOnClick = this.AutoCollapseOnClick;
			objCopy.Tag=m_ItemData;
            objCopy.CanCustomize = m_CanCustomize;
            objCopy.Command = this.Command;
            objCopy.CommandParameter = this.CommandParameter;
            objCopy.KeyTips = this.KeyTips;
			if(m_SubItems!=null)
			{
				foreach(BaseItem objItem in m_SubItems)
					objCopy.SubItems.Add(objItem.Copy());
			}

			if(ItemCopied!=null)
				ItemCopied(objCopy,new EventArgs());
		}