Пример #1
0
 private void UnhookTitleEvent(wucDX_Base control)
 {
     if (control != null)
     {
         control.TitleChanged -= SetTitle;
     }
 }
Пример #2
0
        private void HookTitleEvent(wucDX_Base control)
        {
            SetTitle(control, EventArgs.Empty);

            if (control != null)
            {
                control.TitleChanged += SetTitle;
            }
        }
Пример #3
0
        private void ShowUserControl(wucDX_Base control)
        {
            //UnhookTitleEvent(_currentControl);
            dpUserControlContainer.Children.Clear();

            if (control != null)
            {
                dpUserControlContainer.Children.Add(control);
                _currentControl = control;
            }

            //HookTitleEvent(_currentControl);
        }
Пример #4
0
        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);
        }