private void UnhookTitleEvent(wucDX_Base control)
 {
     if (control != null)
     {
         control.TitleChanged -= SetTitle;
         //this.TitleChanged2 -= SetTitle2;
     }
 }
        private void HookTitleEvent(wucDX_Base control)
        {
            SetTitle(control, EventArgs.Empty);

            //SetTitle2(this, EventArgs.Empty);

            if (control != null)
            {
                control.TitleChanged += SetTitle;
                //this.TitleChanged2 += SetTitle2;
            }
        }
        private void SetTitle(object sender, EventArgs e)
        {
            // TODO(crhodes): This needs to raise the event to
            // the window that hosts us.  How to do that??

            wucDX_Base uc = sender as wucDX_Base;

            if (uc != null && !string.IsNullOrEmpty(uc.Title))
            {
                System.Diagnostics.Debug.WriteLine(this.Title);
                this.Title = string.Format("EOL:{0}", uc.Title);
                Title      = uc.Title;
                System.Diagnostics.Debug.WriteLine(this.Title);
            }
            else
            {
                this.Title = "main Form";
            }

            //SetTitle2(sender, e);
        }