示例#1
0
 void _dockWindow_Closed(object sender, EventArgs e)
 {
     _dockWindow = null;
 }
示例#2
0
        private void OnAccordianButtonClick(object sender, RoutedEventArgs e)
        {
            //var window = new AccordianWindow(_tasks)
            //                 {
            //                     WindowStartupLocation = WindowStartupLocation.CenterOwner
            //                 };
            //window.Show();
            //Hide();

            if (DockingState == WindowDockingState.Normal)
            {
                _dockWindow = new DockWindow(this)
                                  {
                                      WindowStartupLocation = WindowStartupLocation.Manual,
                                      Top = 0,
                                      Height = SystemParameters.PrimaryScreenHeight-30
                                  };
                _dockWindow.Left = SystemParameters.PrimaryScreenWidth - _dockWindow.Width;
                _dockWindow.Show();

                _dockWindow.Closed += _dockWindow_Closed;

                AddDefaultDockingControls();
            }
            else
            {
                Hide();
                _dockWindow.Activate();
            }
        }