Esempio n. 1
0
        void preview_TabbedThumbnailBitmapRequested(object sender, TabbedThumbnailBitmapRequestedEventArgs e)
        {
            foreach (TitleBarTab tab in Tabs)
            {
                RDCWindow rdcWindow = (RDCWindow)tab.Content;

                if (rdcWindow.Handle == e.WindowHandle && _previews.ContainsKey(rdcWindow))
                {
                    e.SetImage(_previews[rdcWindow]);
                    break;
                }
            }
        }
Esempio n. 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)))
			{
				e.SetImage(_previews[rdcWindow.Content]);
				break;
			}
		}