• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.ToolStripRenderEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.ToolStripRenderEventArgs的典型用法代码示例。如果您正苦于以下问题:C# ToolStripRenderEventArgs类的具体用法?C# ToolStripRenderEventArgs怎么用?C# ToolStripRenderEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ToolStripRenderEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripRenderEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnRenderToolStripBackground

 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
     if (e.ToolStrip is ToolStripDropDown)
         base.OnRenderToolStripBackground(e);
     else
         e.Graphics.FillRectangle(SystemBrushes.Control, e.AffectedBounds);
 }
开发者ID:netide,项目名称:netide,代码行数:7,代码来源:ToolStripSimpleRenderer.cs


示例2: OnRenderToolStripBackground

 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
     var g = e.Graphics;
     g.FillRectangle(UserBrushes.Window, e.AffectedBounds);
     g.DrawRectangle(UserPens.Border, new Rectangle(0, 0, e.AffectedBounds.Width - 1, e.AffectedBounds.Height - 1));
     g.DrawLine(UserPens.Window, 1, 0, e.AffectedBounds.Width - 2, 0);
 }
开发者ID:rizwan3d,项目名称:elalang,代码行数:7,代码来源:DocumentMenuRenderer.cs


示例3: OnRenderToolStripBackground

        protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
        {
            Color       start =  _startColor;
            Color       end = _endColor;

            ToolStrip   toolStrip = e.ToolStrip;
            Graphics    g = e.Graphics;

            int         boundsHeight = e.AffectedBounds.Height;
            int         height = (boundsHeight + _lines - 1) / _lines;
            int         width = e.AffectedBounds.Width;
            int         stripeHeight = height - 1;
            Rectangle   stripeRect;

            using (Brush b = new LinearGradientBrush(new Rectangle(0, 0, width, stripeHeight), start, end, LinearGradientMode.Horizontal))
            {
                for (int idx = 0; idx < _lines; idx++)
                {
                    stripeRect = new Rectangle(0, height * idx + 1, width, stripeHeight);
                    g.FillRectangle(b, stripeRect);
                }
            }

            if (this.DrawEndLine)
            {
                using (Brush solidBrush = new SolidBrush(Color.FromArgb(177, 177, 177)))
                {
                    g.FillRectangle(solidBrush, new Rectangle(0, boundsHeight - 1, width, 1));
                }
            }
        }
开发者ID:atan888,项目名称:MMS,代码行数:31,代码来源:HeaderRenderer.cs


示例4: RenderToolStripBorderInternal

 private void RenderToolStripBorderInternal(ToolStripRenderEventArgs e)
 {
     Rectangle rectangle = new Rectangle(Point.Empty, e.ToolStrip.Size);
     Graphics graphics = e.Graphics;
     using (Pen pen = new Pen(SystemColors.ButtonShadow))
     {
         pen.DashStyle = DashStyle.Dot;
         bool flag = (rectangle.Width & 1) == 1;
         bool flag2 = (rectangle.Height & 1) == 1;
         int num = 2;
         graphics.DrawLine(pen, rectangle.X + num, rectangle.Y, rectangle.Width - 1, rectangle.Y);
         graphics.DrawLine(pen, (int) (rectangle.X + num), (int) (rectangle.Height - 1), (int) (rectangle.Width - 1), (int) (rectangle.Height - 1));
         graphics.DrawLine(pen, rectangle.X, rectangle.Y + num, rectangle.X, rectangle.Height - 1);
         graphics.DrawLine(pen, (int) (rectangle.Width - 1), (int) (rectangle.Y + num), (int) (rectangle.Width - 1), (int) (rectangle.Height - 1));
         graphics.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, 1, 1, 1));
         if (flag)
         {
             graphics.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(rectangle.Width - 2, 1, 1, 1));
         }
         if (flag2)
         {
             graphics.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(1, rectangle.Height - 2, 1, 1));
         }
         if (flag2 && flag)
         {
             graphics.FillRectangle(SystemBrushes.ButtonShadow, new Rectangle(rectangle.Width - 2, rectangle.Height - 2, 1, 1));
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:29,代码来源:ToolStripProfessionalLowResolutionRenderer.cs


示例5: OnRenderToolStripBackground

        protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
        {
            base.OnRenderToolStripBackground(e);

            if (e.ToolStrip is ToolStripDropDownMenu) return;
            using (LinearGradientBrush lgBrush = new LinearGradientBrush(Point.Empty, new PointF(0, e.ToolStrip.Height),
                    ToolStripColorTable.ToolStripBackgroundTop, ToolStripColorTable.ToolStripBackgroundBottom))
            {
                ColorBlend blend = new ColorBlend(3);
                blend.Colors = new Color[] { ToolStripColorTable.ToolStripBackgroundTop, 
                    ToolStripColorTable.ToolStripBackgroundMiddle,ToolStripColorTable.ToolStripBackgroundMiddle,
                    ToolStripColorTable.ToolStripBackgroundBottom};
                blend.Positions = new float[] { 0.0f, 0.33f,0.58f, 1.0f };

                lgBrush.InterpolationColors = blend;            

                using (GraphicsPath border = GetToolStripRectangle(e.ToolStrip))
                {
                    e.Graphics.FillPath(lgBrush, border);
                    e.Graphics.DrawLine(new Pen( ToolStripColorTable.ToolStripBackgroundTopLine), 0, 0, e.ToolStrip.Width, 0);
                    e.Graphics.DrawLine(new Pen( ToolStripColorTable.ToolStripBackgroundBottomLine), 0, e.ToolStrip.Height - 2,
                        e.ToolStrip.Width, e.ToolStrip.Height - 2);
                }
            }

        }
开发者ID:Vinna,项目名称:DeepInSummer,代码行数:26,代码来源:ToolStripRender.cs


示例6: OnRenderToolStripBorder

		protected override void OnRenderToolStripBorder( ToolStripRenderEventArgs e ) {
			if (e.ToolStrip.GetType() == typeof(ToolStrip)) {

			} else {
				base.OnRenderToolStripBorder(e);
			}
		}
开发者ID:mibbio,项目名称:PoE-Helper,代码行数:7,代码来源:FixedToolstripRenderer.cs


示例7: OnRenderToolStripBackground

		protected virtual void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
		{
			if (StackStripRenderer != null)
			{
				// Setup colors from the provided renderer
				Color start = StackStripRenderer.ColorTable.ToolStripGradientMiddle;
				Color end = StackStripRenderer.ColorTable.ToolStripGradientEnd;
				
				// Size to paint
				Rectangle bounds = new Rectangle(Point.Empty, e.ToolStrip.Size);

				// Make sure we need to do work
				if ((bounds.Width > 0) && (bounds.Height > 0))
				{
					using (Brush b = new LinearGradientBrush(bounds, start, end, LinearGradientMode.Vertical))
					{
						e.Graphics.FillRectangle(b, bounds);
					}
				}

				// Draw border
				//e.Graphics.DrawRectangle(SystemPens.ControlDarkDark, bounds);
				e.Graphics.DrawLine(SystemPens.ControlDarkDark, bounds.X, bounds.Y, bounds.Width - 1, bounds.Y);
				e.Graphics.DrawLine(SystemPens.ControlDarkDark, bounds.X, bounds.Y, bounds.X, bounds.Height - 1);
				e.Graphics.DrawLine(SystemPens.ControlDarkDark, bounds.X + bounds.Width - 1, bounds.Y, bounds.X + bounds.Width - 1, bounds.Height - 1);
			}
		}
开发者ID:haoasqui,项目名称:MailSystem.NET,代码行数:27,代码来源:BaseStackStrip.cs


示例8: OnRenderToolStripBorder

        protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
        {
            if (ShowBorder)
            {
                ThemeManager.PrepareGraphics(e.Graphics);

                using (Pen p = new Pen(ThemeManager.SelectedColor, 1))
                {
                    Point p1, p2 = Point.Empty;

                    if (VerticalGradient)
                    {
                        p1 = new Point(e.AffectedBounds.Left, e.AffectedBounds.Bottom - 1);
                        p2 = new Point(e.AffectedBounds.Right, e.AffectedBounds.Bottom - 1);
                    }
                    else
                    {
                        p1 = new Point(e.AffectedBounds.Right - 1, e.AffectedBounds.Top);
                        p2 = new Point(e.AffectedBounds.Right - 1, e.AffectedBounds.Bottom);
                    }

                    e.Graphics.DrawLine(p, p1, p2);
                }
            }
        }
开发者ID:rraguso,项目名称:protone-suite,代码行数:25,代码来源:ToolAndMenuStrips.cs


示例9: OnRenderToolStripBackground

 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
    using (Brush bgBrush = new SolidBrush(this.colors.ToolStripDropDownBackground))
    {
       e.Graphics.FillRectangle(bgBrush, e.AffectedBounds);
    }
 }
开发者ID:Sugz,项目名称:Outliner-3.0,代码行数:7,代码来源:OutlinerToolStripRenderer.cs


示例10: OnRenderToolStripBorder

 protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
 {
     var bounds = new Rectangle(Point.Empty, e.ToolStrip.Size);
     
     using (Pen pen = new Pen(NavigationColourTable.BACK_COLOR))
         e.Graphics.DrawRectangle(pen, bounds);
 }
开发者ID:huizh,项目名称:xenadmin,代码行数:7,代码来源:NavigationToolStripRenderer.cs


示例11: OnRenderToolStripBorder

 protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
 {
     if (e.ToolStrip.Name == "toolStrip1")
     {
         base.OnRenderToolStripBorder(e);
     }
 }
开发者ID:jasperdj,项目名称:Playground,代码行数:7,代码来源:Program.cs


示例12: OnRenderToolStripBorder

 protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
 {
     if (e.ToolStrip is ToolStripDropDown)
     {
         base.OnRenderToolStripBorder(e);
     }
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:7,代码来源:BorderLessToolStripRenderer.cs


示例13: OnRenderToolStripBackground

 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
     Rectangle rect = e.AffectedBounds;
     Brush b = new LinearGradientBrush(rect, this.ColorTable.StatusStripGradientBegin,
                                       this.ColorTable.StatusStripGradientEnd, 270.0f);
     e.Graphics.FillRectangle(b, rect);
 }
开发者ID:westybsa,项目名称:MP.LSharp,代码行数:7,代码来源:ToolStripRenderers.cs


示例14: OnRenderToolStripBackground

			protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e) {
				GraphicsHelper helper = new GraphicsHelper(e.Graphics);
				Rectangle bounds = new Rectangle(-1, -1, e.AffectedBounds.Width + 1, e.AffectedBounds.Height + 1);

				//helper.Clear(UColor.Argb(255, 0, 0, 0));
				helper.Gradient(UColor.Rgb(0x30, 0x30, 0x30), UColor.Rgb(0x1D, 0x1D, 0x1D), bounds, 90);
			}
开发者ID:Hakua,项目名称:PokeSharp,代码行数:7,代码来源:ToolBar.cs


示例15: OnRenderImageMargin

        protected override void OnRenderImageMargin(ToolStripRenderEventArgs e)
        {
            base.OnRenderImageMargin(e);

            // Gray background
            using (var brush = new SolidBrush(RendererColors.SubmenuBackGround))
                e.Graphics.FillRectangle(brush, 0, 0, e.ToolStrip.Width, e.ToolStrip.Height);

            // Draw ImageMargin background gradient
            using (var gradientBrush = new LinearGradientBrush(
                e.AffectedBounds,
                RendererColors.ImageMarginWhite,
                RendererColors.ImageMarginBlue,
                LinearGradientMode.Horizontal))
                e.Graphics.FillRectangle(gradientBrush, e.AffectedBounds);

            // Shadow at the right of image margin
            var rightStroke1 = new Rectangle(e.AffectedBounds.Width, 2, 1, e.AffectedBounds.Height);
            var rightStroke2 = new Rectangle(e.AffectedBounds.Width + 1, 2, 1, e.AffectedBounds.Height);
            using (var darkLineBrush = new SolidBrush(RendererColors.ImageMarginLine))
                e.Graphics.FillRectangle(darkLineBrush, rightStroke1);            
            e.Graphics.FillRectangle(Brushes.White, rightStroke2);

            // Border
            using (var borderPen = new Pen(RendererColors.MenuBorder))
            {
                var toolStripInner = new Rectangle(0, 1, e.ToolStrip.Width - 1, e.ToolStrip.Height - 2);
                e.Graphics.DrawRectangle(borderPen, toolStripInner);
            }
        }
开发者ID:sagar1589,项目名称:Delta.Cryptography,代码行数:30,代码来源:VisualStudio2008Renderer.cs


示例16: OnRenderToolStripBorder

 protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e)
 {
     var pen = new Pen(SystemColors.HotTrack);
     var rectangle = e.AffectedBounds;
     rectangle.Offset(0, -1);
     e.Graphics.DrawRectangle(pen, rectangle);
 }
开发者ID:HTD,项目名称:TraxCodeEditor,代码行数:7,代码来源:ToolStripRendererOverride.cs


示例17: OnRenderToolStripBackground

		/// <summary></summary>
		protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
		{
			base.OnRenderToolStripBackground(e);

			var brush = new LinearGradientBrush((Rectangle)e.ToolStrip.ClientRectangle, itemArea_backgroundColor_top, itemArea_backgroundColor_bottom, 90, true);
			e.Graphics.FillRectangle(brush, e.AffectedBounds);
		}
开发者ID:bbriggs,项目名称:FieldWorks,代码行数:8,代码来源:SideBarItemAreaRenderer.cs


示例18: OnRenderToolStripBackground

 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
     using (SolidBrush brush = new SolidBrush(BACKGROUND_COLOR))
     {
         e.Graphics.FillRectangle(brush, e.AffectedBounds);
     }
 }
开发者ID:yienit,项目名称:KST,代码行数:7,代码来源:NuiContextMenuStripRender.cs


示例19: OnRenderToolStripBackground

 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
     Rectangle rect = e.AffectedBounds;
     using (SolidBrush brush = new SolidBrush(Color.White))
     {
         e.Graphics.FillRectangle(brush, rect);
     }
 }
开发者ID:kaduardo,项目名称:cyberduck,代码行数:8,代码来源:FirefoxStyleRenderer.cs


示例20: OnRenderToolStripBackground

 protected override void OnRenderToolStripBackground(ToolStripRenderEventArgs e)
 {
     using (Brush brush = new SolidBrush(this.ToolStrip == null ? e.BackColor : this.ToolStrip.BackColor))  // SystemColors.ControlDark
     {
         e.Graphics.FillRectangle(brush, e.AffectedBounds);
     }
     // base.OnRenderToolStripBackground(e);
 }
开发者ID:renyh1013,项目名称:dp2weixin,代码行数:8,代码来源:TransparentToolStripRenderer.cs



注:本文中的System.Windows.Forms.ToolStripRenderEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ToolStripSeparator类代码示例发布时间:2022-05-26
下一篇:
C# Forms.ToolStripProgressBar类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap