packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/ShellExtensions/PreviewHandlers/WinformsPreviewHandler.cs
/// <summary>
/// Called when an exception is thrown during itialization of the preview control.
/// </summary>
/// <param name="caughtException"></param>
Called when an exception is thrown during itialization of the preview control.
Called when an exception is thrown during itialization of the preview control .
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", 
            Justification="The object remains reachable through the Controls collection which can be disposed at a later time.")]
        protected override void HandleInitializeException(Exception caughtException)
        {
            if (caughtException == null) { throw new ArgumentNullException("caughtException"); }
            Control = new UserControl();
            Control.Controls.Add(new TextBox
                {
                    ReadOnly = true,
                    Multiline = true,
                    Dock = DockStyle.Fill,
                    Text = caughtException.ToString(),
                    BackColor = Color.OrangeRed
                });
        }
[ System . Diagnostics . CodeAnalysis . SuppressMessage ( " " , " " , Justification = " " ) ] protected override void HandleInitializeException ( Exception caughtException ) { if ( caughtException == null ) { throw new ArgumentNullException ( " " ) ; } Control = new UserControl ( ) ; Control . Controls . Add ( new TextBox { ReadOnly = true , Multiline = true , Dock = DockStyle . Fill , Text = caughtException . ToString ( ) , BackColor = Color . OrangeRed } ) ; }
Called when an exception is thrown during itialization of the preview control.
Called when an exception is thrown during itialization of the preview control .
caughtException
Exception
None