• 大小: 0.10M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-26
  • 语言: 其他
  • 标签: 其他  

资源简介


自定义控件继承自Panel,实现带阴影的立体效果

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;

namespace ShadowPanel
{
    public class ShadowPanel : Panel
    {
        private Color _panelColor;

        public Color PanelColor
        {
            get { return _panelColor; }
            set { _panelColor = value; }
        }

        private Color _borderColor;

        public Color BorderColor
        {
            get { return _borderColor; }
            set { _borderColor = value; }
        }

        private int shadowSize = 5;
        private int shadowMargin = 2;

        // static for good perfomance 
        static Image shadowDownRight = new Bitmap(typeof(ShadowPanel) “Images.tshadowdownright.png“);
        static Image shadowDownLeft = new Bitmap(typeof(ShadowPanel) “Images.tshadowdownleft.png“);
        static Image shadowDown = new Bitmap(typeof(ShadowPanel) “Images.tshadowdown.pn

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2007-07-01 00:17  ShadowPanel\
     目录           0  2007-07-01 00:16  ShadowPanel\ShadowPanel\
     目录           0  2007-06-16 23:04  ShadowPanel\ShadowPanel\bin\
     目录           0  2007-06-11 13:07  ShadowPanel\ShadowPanel\bin\Debug\
     文件       20480  2007-07-01 00:16  ShadowPanel\ShadowPanel\bin\Debug\ShadowPanel.dll
     文件       15872  2007-07-01 00:16  ShadowPanel\ShadowPanel\bin\Debug\ShadowPanel.pdb
     目录           0  2007-06-16 23:04  ShadowPanel\ShadowPanel\bin\Release\
     文件       20480  2007-07-01 00:16  ShadowPanel\ShadowPanel\bin\Release\ShadowPanel.dll
     文件       13824  2007-07-01 00:16  ShadowPanel\ShadowPanel\bin\Release\ShadowPanel.pdb
     目录           0  2007-06-11 13:06  ShadowPanel\ShadowPanel\Images\
     文件         201  2007-06-11 13:06  ShadowPanel\ShadowPanel\Images\tshadowdown.png
     文件         219  2007-06-11 13:06  ShadowPanel\ShadowPanel\Images\tshadowdownleft.png
     文件         230  2007-06-11 13:06  ShadowPanel\ShadowPanel\Images\tshadowdownright.png
     文件         202  2007-06-11 13:06  ShadowPanel\ShadowPanel\Images\tshadowright.png
     文件         223  2007-06-11 13:06  ShadowPanel\ShadowPanel\Images\tshadowtopright.png
     目录           0  2007-06-16 23:04  ShadowPanel\ShadowPanel\obj\
     目录           0  2007-07-01 00:16  ShadowPanel\ShadowPanel\obj\Debug\
     目录           0  2007-06-11 13:31  ShadowPanel\ShadowPanel\obj\Debug\Refactor\
     文件       16384  2007-06-11 13:31  ShadowPanel\ShadowPanel\obj\Debug\Refactor\ShadowPanel.dll
     文件       20480  2007-07-01 00:16  ShadowPanel\ShadowPanel\obj\Debug\ShadowPanel.dll
     文件         201  2007-06-11 13:06  ShadowPanel\ShadowPanel\obj\Debug\ShadowPanel.Images.tshadowdown.png
     文件         219  2007-06-11 13:06  ShadowPanel\ShadowPanel\obj\Debug\ShadowPanel.Images.tshadowdownleft.png
     文件         230  2007-06-11 13:06  ShadowPanel\ShadowPanel\obj\Debug\ShadowPanel.Images.tshadowdownright.png
     文件         202  2007-06-11 13:06  ShadowPanel\ShadowPanel\obj\Debug\ShadowPanel.Images.tshadowright.png
     文件         223  2007-06-11 13:06  ShadowPanel\ShadowPanel\obj\Debug\ShadowPanel.Images.tshadowtopright.png
     文件       15872  2007-07-01 00:16  ShadowPanel\ShadowPanel\obj\Debug\ShadowPanel.pdb
     目录           0  2007-06-11 12:58  ShadowPanel\ShadowPanel\obj\Debug\TempPE\
     目录           0  2007-07-01 00:16  ShadowPanel\ShadowPanel\obj\Release\
     文件       20480  2007-07-01 00:16  ShadowPanel\ShadowPanel\obj\Release\ShadowPanel.dll
     文件         201  2007-06-11 13:06  ShadowPanel\ShadowPanel\obj\Release\ShadowPanel.Images.tshadowdown.png
     文件         219  2007-06-11 13:06  ShadowPanel\ShadowPanel\obj\Release\ShadowPanel.Images.tshadowdownleft.png
............此处省略56个文件信息

评论

共有 条评论