Пример #1
0
 /// <summary>
 /// Handler method that's called when Aero Peek needs to display a thumbnail for a <see cref="TitleBarTab" />; finds the preview bitmap generated in
 /// <see cref="TabDeselecting" /> and returns that.
 /// </summary>
 /// <param name="sender">Object from which this event originated.</param>
 /// <param name="e">Arguments associated with this event.</param>
 private void preview_TabbedThumbnailBitmapRequested(object sender, TabbedThumbnailBitmapRequestedEventArgs e)
 {
     foreach (
         TitleBarTab rdcWindow in Tabs.Where(rdcWindow => rdcWindow.Content.Handle == e.WindowHandle && _previews.ContainsKey(rdcWindow.Content)))
     {
         e.SetImage(_previews[rdcWindow.Content]);
         break;
     }
 }
Пример #2
0
        /// <summary>
        /// Handler method that's called when Aero Peek needs to display a thumbnail for a <see cref="TitleBarTab" />; finds the preview bitmap generated in
        /// <see cref="TabDeselecting" /> and returns that.
        /// </summary>
        /// <param name="sender">Object from which this event originated.</param>
        /// <param name="e">Arguments associated with this event.</param>
        private void preview_TabbedThumbnailBitmapRequested(object sender, TabbedThumbnailBitmapRequestedEventArgs e)
        {
            foreach (
                TitleBarTab rdcWindow in Tabs.Where(rdcWindow => rdcWindow.Content.Handle == e.WindowHandle && _previews.ContainsKey(rdcWindow.Content)))
            {
                TabbedThumbnail preview = TaskbarManager.Instance.TabbedThumbnail.GetThumbnailPreview(rdcWindow.Content);
                preview.SetImage(_previews[rdcWindow.Content]);

                break;
            }
        }
Пример #3
0
 private void Preview_TabbedThumbnailBitmapRequested(object sender, TabbedThumbnailBitmapRequestedEventArgs e)
 {
     e.Handled = UpdateCurrentPreview(sender as TabbedThumbnail);
 }