packages/Windows API Code Pack 1.1/source/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs
/// <summary>
/// Displays a placeholder for the explorer browser in design mode
/// </summary>
/// <param name="e">Contains information about the paint event.</param>
Displays a placeholder for the explorer browser in design mode
Displays a placeholder for the explorer browser in design mode
protected override void OnPaint(PaintEventArgs e)
        {
            if (DesignMode && e != null)
            {
                using (LinearGradientBrush linGrBrush = new LinearGradientBrush(
                    ClientRectangle,
                    Color.Aqua,
                    Color.CadetBlue,
                    LinearGradientMode.ForwardDiagonal))
                {
                    e.Graphics.FillRectangle(linGrBrush, ClientRectangle);
                }
                using (Font font = new Font("Garamond", 30))
                {
                    using (StringFormat sf = new StringFormat())
                    {
                        sf.Alignment = StringAlignment.Center;
                        sf.LineAlignment = StringAlignment.Center;
                        e.Graphics.DrawString(
                            "ExplorerBrowserControl",
                            font,
                            Brushes.White,
                            ClientRectangle,
                            sf);
                    }
                }
            }
            base.OnPaint(e);
        }
protected override void OnPaint ( PaintEventArgs e ) { if ( DesignMode && e != null ) { using ( LinearGradientBrush linGrBrush = new LinearGradientBrush ( ClientRectangle , Color . Aqua , Color . CadetBlue , LinearGradientMode . ForwardDiagonal ) ) { e . Graphics . FillRectangle ( linGrBrush , ClientRectangle ) ; } using ( Font font = new Font ( " " , 30 ) ) { using ( StringFormat sf = new StringFormat ( ) ) { sf . Alignment = StringAlignment . Center ; sf . LineAlignment = StringAlignment . Center ; e . Graphics . DrawString ( " " , font , Brushes . White , ClientRectangle , sf ) ; } } } base . OnPaint ( e ) ; }
Displays a placeholder for the explorer browser in design mode
Displays a placeholder for the explorer browser in design mode
e
PaintEventArgs
Contains information about the paint event.
Contains information about the paint event .