• 大小: 1.28MB
    文件类型: .rar
    金币: 2
    下载: 2 次
    发布日期: 2023-10-04
  • 语言: C#
  • 标签: code  

资源简介

C# winform左侧导航抽屉菜单,挺好用的,很炫,挺好的资源

资源截图

代码片段和文件信息

using System;
using System.ComponentModel;
using System.Windows.Forms;
using CSharpWin.Win32.Struct;
using System.Runtime.InteropServices;
using CSharpWin.Win32;
using System.Drawing;
using System.Drawing.Drawing2D;
using CSharpWin.Win32.Const;
using System.Drawing.Imaging;

namespace CSharpWin
{
    public class BorderPanel : Panelbase
    {
        public BorderPanel()
            : base()
        {
        }

        public override Rectangle DisplayRectangle
        {
            get
            {
                Rectangle rect = base.DisplayRectangle;
                int borderWidth = base.BorderWidth;
                rect.Inflate(-borderWidth -borderWidth);
                return rect;
            }
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            OnPaintBorder(e);
        }

        protected virtual void OnPaintBorder(PaintEventArgs e)
        {
            RenderBorder(e.Graphics base.ClientRectangle);
        }

        private void RenderBorder(Graphics g Rectangle bounds)
        {
            if (Roundstyle == Roundstyle.None)
            {
                ControlPaint.DrawBorder(
                    g
                    bounds
                    ColorTable.Border
                    ButtonBorderstyle.Solid);
            }
            else
            {
                using (SmoothingModeGraphics sg = new SmoothingModeGraphics(g))
                {
                    using (GraphicsPath path = GraphicsPathHelper.CreatePath(
                        bounds Radius Roundstyle true))
                    {
                        using (Pen pen = new Pen(ColorTable.Border))
                        {
                            g.DrawPath(pen path);
                        }
                    }
                }
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     84992  2018-07-17 21:19  PushPanelDemo\.vs\PushPanelDemo\v15\.suo

     文件          0  2018-07-17 21:18  PushPanelDemo\.vs\PushPanelDemo\v15\Server\sqlite3\db.lock

     文件     765952  2018-07-17 21:19  PushPanelDemo\.vs\PushPanelDemo\v15\Server\sqlite3\storage.ide

     文件       1936  2010-08-10 23:07  PushPanelDemo\Backup\PushPanel\BorderPanel.cs

     文件        402  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\CaptionImagestyle.cs

     文件      25293  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\CaptionPanel.cs

     文件        417  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\Captionstyle.cs

     文件      16917  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\ControlPaintEx.cs

     文件        889  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\ControlState.cs

     文件       7740  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\Design\PanelDesigner.cs

     文件       2690  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\Design\PushPanelDesigner.cs

     文件       3708  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\Design\PushPanelItemDesigner.cs

     文件      10258  2010-04-06 23:24  PushPanelDemo\Backup\PushPanel\GraphicsPathHelper.cs

     文件       2753  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\ImageDc.cs

     文件       1207  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\InterpolationModeGraphics.cs

     文件      13160  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\NCPanel.cs

     文件       4259  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\Panelbase.cs

     文件       1519  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\PanelColorTable.cs

     文件       1420  2010-08-12 09:40  PushPanelDemo\Backup\PushPanel\Properties\AssemblyInfo.cs

     文件      14987  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\PushPanel.cs

     文件       6197  2010-08-12 10:34  PushPanelDemo\Backup\PushPanel\PushPanel.csproj

     文件       9800  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\PushPanelItem.cs

     文件        925  2010-08-11 10:37  PushPanelDemo\Backup\PushPanel\PushPanelItemCaptionclickEventArgs.cs

     文件       1438  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\Regionhelper.cs

     文件      13744  2010-04-07 13:26  PushPanelDemo\Backup\PushPanel\RenderHelper.cs

     文件       1700  2010-04-06 23:08  PushPanelDemo\Backup\PushPanel\Roundstyle.cs

     文件       1148  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\SmoothingModeGraphics.cs

     文件       1274  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\TextRenderingHintGraphics.cs

     文件        601  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\ThumbArrowDirection.cs

     文件        273  2010-04-03 14:53  PushPanelDemo\Backup\PushPanel\Win32\ClassName.cs

............此处省略275个文件信息

评论

共有 条评论