/// <summary>
        /// Returns copy of the item.
        ///
        /// This routine is called to propagate the item
        /// within each view (both in the same view as well as
        /// across multiple views in multi-user displays)
        /// </summary>
        public override BaseItem Copy()
        {
            GlossyCustomItem objCopy = new GlossyCustomItem();

            CopyToItem(objCopy);

            return(objCopy);
        }
        /// <summary>
        /// Handles CheckBox CheckChange events for non-base items
        ///
        /// This routine handles item CheckBox.Checked changes. This routine
        /// then propagates the change to the BaseCalendarItem.  All
        /// associated items should have hooked onto the BaseCalendarItem so
        /// that they will be notified of the change (via BaseCheckedChanged).
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void CheckedChanged(object sender, CheckBoxChangeEventArgs e)
        {
            GlossyCustomItem myView = (GlossyCustomItem)BaseCalendarItem;

            // Propagate the change

            if (myView != null)
            {
                myView.CheckBox.Checked = _CheckBox.Checked;
            }
        }
        /// <summary>
        /// Handles CheckBox CheckChange events for base items
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void BaseCheckedChanged(object sender, CheckBoxChangeEventArgs e)
        {
            GlossyCustomItem myView = (GlossyCustomItem)BaseCalendarItem;

            if (myView != null)
            {
                // Update our state and refresh our control

                _CheckBox.Checked = myView.CheckBox.Checked;

                Refresh();
            }
        }
        /// <summary>
        /// Copies the CustomCalendarItem specific properties
        /// to new instance of the item
        /// </summary>
        /// <param name="copy">New CustomCalendarItem instance</param>
        protected override void CopyToItem(BaseItem copy)
        {
            GlossyCustomItem objCopy = copy as GlossyCustomItem;

            if (objCopy != null)
            {
                objCopy.HookEvents(false);
                objCopy.SubItems.Clear();

                base.CopyToItem(objCopy);

                objCopy._CheckBox = (CheckBoxItem)objCopy.SubItems[0];
                objCopy.HookEvents(true);

                objCopy.CheckBox.Checked = _CheckBox.Checked;
            }
        }
        /// <summary>
        /// Hooks or unhooks our BaseCalendarItem events
        /// </summary>
        /// <param name="hook">true to hook, false to unhook</param>
        private void HookBaseEvents(bool hook)
        {
            GlossyCustomItem gci = BaseCalendarItem as GlossyCustomItem;

            if (gci != null)
            {
                // Hook onto all base events that we are interested in
                // propagating back through the BaseCalendarItem to other
                // like items

                if (hook == true)
                {
                    gci.CheckBox.CheckedChanged += BaseCheckedChanged;
                }
                else
                {
                    gci.CheckBox.CheckedChanged -= BaseCheckedChanged;
                }
            }
        }