Пример #1
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     isClosing = true;
     dwmThumbnail.SourceWindowHandle = IntPtr.Zero;
     taskButton.ThumbWindow          = null;
     taskButton.SetParentAutoHide(true);
 }
Пример #2
0
        public TaskThumbWindow(TaskButton parent)
        {
            InitializeComponent();

            taskButton  = parent;
            DataContext = parent.Window;

            taskButton.SetParentAutoHide(false);
        }
Пример #3
0
        public TaskThumbWindow(TaskButton parent)
        {
            InitializeComponent();

            TaskButton  = parent;
            DataContext = TaskButton;

            TaskButton.SetParentAutoHide(false);

            IsDwmEnabled = NativeMethods.DwmIsCompositionEnabled();
        }
Пример #4
0
        private void Window_Closing(object sender, CancelEventArgs e)
        {
            isClosing = true;
            TaskButton.ThumbWindow = null;
            TaskButton.SetParentAutoHide(true);

            if (TaskButton != null && TaskButton.WindowGroup != null)
            {
                ((INotifyCollectionChanged)TaskButton.WindowGroup).CollectionChanged -= TaskThumbWindow_CollectionChanged;
            }
        }
        public TaskThumbWindow(TaskButton parent)
        {
            InitializeComponent();

            taskButton  = parent;
            DataContext = parent.Window;

            taskButton.SetParentAutoHide(false);

            // check if DWM is enabled, if not, hide the thumbnail placeholder
            isDwmEnabled = NativeMethods.DwmIsCompositionEnabled();
            if (!isDwmEnabled)
            {
                dwmThumbnail.Visibility = Visibility.Collapsed;
                pnlTitle.Margin         = new Thickness(0);
            }
        }