internal bool OnTabbedThumbnailClosed()
{
var closedHandler = TabbedThumbnailClosed;
if (closedHandler != null)
{
var closingEvent = GetTabbedThumbnailClosingEventArgs();
closedHandler(this, closingEvent);
if (closingEvent.Cancel) { return false; }
}
else
{
// No one is listening to these events. Forward the message to the main window
CoreNativeMethods.SendMessage(ParentWindowHandle, WindowMessage.NCDestroy, IntPtr.Zero, IntPtr.Zero);
}
// Remove it from the internal list as well as the taskbar
TaskbarManager.Instance.TabbedThumbnail.RemoveThumbnailPreview(this);
return true;
}