Ejemplo n.º 1
0
        void OpenVolumeControlWindow()
        {
            if (!ready)
            {
                return;
            }
            if (vcWindow != null)
            {
                if (!vcWindow.Activate())
                {
                    vcWindow.Close();
                }
                return;
            }
            vcWindow         = new VolumeControlWindow(viewModel);
            vcWindow.Closed += delegate { vcWindow = null; };
            ElementHost.EnableModelessKeyboardInterop(vcWindow);
            Rect wa = SystemParameters.WorkArea;

            vcWindow.Left = wa.Right - vcWindow.Width;
            vcWindow.Top  = wa.Bottom - vcWindow.Height;
            vcWindow.Show();
            if (!vcWindow.Activate())
            {
                vcWindow.Close();
            }
        }
Ejemplo n.º 2
0
 private void MenuItemVolumeControlWindow_Click(object sender, RoutedEventArgs e)
 {
     if (m_VolumeControlWindow == null || !m_VolumeControlWindow.IsLoaded)
     {
         m_VolumeControlWindow = new VolumeControlWindow();
         m_VolumeControlWindow.Show();
         m_VolumeControlWindow.Focus();
     }
 }