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

C# Forms.ToolStripArrowRenderEventArgs类代码示例

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

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



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

示例1: OnRenderArrow

 /// <summary>
 /// Raises the <see cref="System.Windows.Forms.ToolStripRenderer.RenderArrow"/> event.
 /// </summary>
 /// <param name="e">A <see cref="System.Windows.Forms.ToolStripArrowRenderEventArgs"/> that contains the event data.</param>
 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if (ColorTable.UseSystemColors == true)
     {
         base.OnRenderArrow(e);
     }
     else
     {
         ProfessionalColorTable colorTable = ColorTable as BSE.Windows.Forms.ProfessionalColorTable;
         if ((colorTable != null) && (e.Item.Enabled == true))
         {
             if (e.Item.Owner is MenuStrip)
             {
                 e.ArrowColor = colorTable.MenuItemText;
             }
             else if (e.Item.Owner is StatusStrip)
             {
                 e.ArrowColor = colorTable.StatusStripText;
             }
             else
             {
                 if (e.Item.Owner.GetType() != typeof(ToolStripDropDownMenu))
                 {
                     e.ArrowColor = colorTable.ToolStripText;
                 }
             }
         }
         base.OnRenderArrow(e);
     }
 }
开发者ID:mikhp,项目名称:greatmaps,代码行数:34,代码来源:BseRenderer.cs


示例2: OnRenderArrow

        /// <summary>
        /// Raises the RenderArrow event.
        /// </summary>
        /// <param name="e">A ToolStripArrowRenderEventArgs that contains the event data.</param>
        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
			if (ColorTable.UseSystemColors == false)
			{
				ProfessionalColorTable colorTable = ColorTable as XiaoCai.WinformUI.Panels.ProfessionalColorTable;
				if (colorTable != null)
				{
					if ((e.Item.Owner.GetType() == typeof(MenuStrip)) && (e.Item.Selected == false) && e.Item.Pressed == false)
					{
						if (colorTable.MenuItemText != Color.Empty)
						{
							e.ArrowColor = colorTable.MenuItemText;
						}
					}
					if ((e.Item.Owner.GetType() == typeof(StatusStrip)) && (e.Item.Selected == false) && e.Item.Pressed == false)
					{
						if (colorTable.StatusStripText != Color.Empty)
						{
							e.ArrowColor = colorTable.StatusStripText;
						}
					}
				}
			}
            base.OnRenderArrow(e);
        }
开发者ID:GarnettLuo,项目名称:XiaoCai.WinformUI,代码行数:29,代码来源:Office2007Renderer.cs


示例3: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if (currentRenderer != null)
         currentRenderer.DrawArrow(e);
     else
         base.OnRenderArrow(e);
 }
开发者ID:zhuangyy,项目名称:Motion,代码行数:7,代码来源:TabStripRenderer.cs


示例4: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if (e.Item.Enabled)
     {
         e.ArrowColor = FORE_COLOR;
     }
     base.OnRenderArrow(e);
 }
开发者ID:yienit,项目名称:KST,代码行数:8,代码来源:NuiContextMenuStripRender.cs


示例5: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     if(e.Item.Enabled)
         e.ArrowColor = Color.Black;
     else
         e.ArrowColor = SystemColors.GrayText;
     base.OnRenderArrow(e);
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:8,代码来源:MSVS2010StyleToolStripRenderer.cs


示例6: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     ToolStripDropDownItem item = e.Item as ToolStripDropDownItem;
     if (!(((item == null) || (e.Direction != ArrowDirection.Down)) || item.DropDown.Visible))
     {
         e.Direction = ArrowDirection.Right;
     }
     base.OnRenderArrow(e);
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:9,代码来源:BreadcrumbToolStripRenderer.cs


示例7: OnRenderArrow

        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            if (!e.Item.Selected && !e.Item.Pressed)
            {
                e.ArrowColor = ColorScheme.ColorGray89;
            }

            base.OnRenderArrow(e);
        }
开发者ID:filipkunc,项目名称:GLGraphics,代码行数:9,代码来源:DarkToolStripRenderer.cs


示例8: OnRenderArrow

 /// <summary>
 /// 绘制 ToolStripItem 上的箭头。
 /// </summary>
 /// <param name="e"></param>
 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     Graphics g = e.Graphics;
     Image arrow = AssemblyHelper.GetImage("QQ.ContextMenu.menu_arrow.png");
     Rectangle imgPoint = new Rectangle(
         e.ArrowRectangle.X + 4,
         (e.ArrowRectangle.Height - arrow.Height) / 2,
         arrow.Width,
         arrow.Height);//图片的位置和显示的大小
     Rectangle imgRect = new Rectangle(0, 0, arrow.Width, arrow.Height);
     g.DrawImage(arrow, imgPoint, imgRect, GraphicsUnit.Pixel);
 }
开发者ID:JimmyFung,项目名称:DesktopHelper,代码行数:16,代码来源:QQToolStripRenderer.cs


示例9: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     ToolStripSplitButton item = e.Item as ToolStripSplitButton;
     if (!((e.Item is ToolStripMenuItem) || !((item != null) ? item.ButtonPressed : e.Item.Pressed)))
     {
         Rectangle arrowRectangle = e.ArrowRectangle;
         arrowRectangle.Offset(1, 1);
         e.ArrowRectangle = arrowRectangle;
     }
     if (!e.Item.Enabled)
     {
         e.ArrowColor = SystemColors.GrayText;
     }
     base.OnRenderArrow(e);
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:15,代码来源:ToolStripFlatRenderer.cs


示例10: OnRenderArrow

        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            try
            {
                e.ArrowRectangle = Rectangle.Inflate(e.ArrowRectangle, 5, -2);

                if (e.Direction == ArrowDirection.Down)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_down, e.ArrowRectangle);
                else if (e.Direction == ArrowDirection.Up)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_up, e.ArrowRectangle);
                else if (e.Direction == ArrowDirection.Left)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_left, e.ArrowRectangle);
                else if (e.Direction == ArrowDirection.Right)
                    e.Graphics.DrawImageUnscaled(Properties.Resources.bullet_arrow_right, e.ArrowRectangle);

                //e.Graphics.FillRectangle(Brushes.Red, e.ArrowRectangle);
            }
            catch
            {
                base.OnRenderArrow(e);
            }
        }
开发者ID:jsutton29,项目名称:Paint-Bucket,代码行数:22,代码来源:GlassToolstripRenderer.cs


示例11: OnRenderArrow

        /// <summary>
        ///     Raises the RenderArrow event.
        /// </summary>
        /// <param name="e"> An ToolStripArrowRenderEventArgs containing the event data. </param>
        protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            // Cannot paint a zero sized area
            if ((e.ArrowRectangle.Width > 0) &&
                (e.ArrowRectangle.Height > 0))
            {
                // Create a path that is used to fill the arrow
                using (GraphicsPath arrowPath = this.CreateArrowPath(e.Item,
                                                                     e.ArrowRectangle,
                                                                     e.Direction))
                {
                    // Get the rectangle that encloses the arrow and expand slightly
                    // so that the gradient is always within the expanding bounds
                    RectangleF boundsF = arrowPath.GetBounds();
                    boundsF.Inflate(1f, 1f);

                    Color color1 = (e.Item.Enabled ? _arrowLight : _arrowDisabled);
                    Color color2 = (e.Item.Enabled ? _arrowDark : _arrowDisabled);

                    float angle = 0;

                    // Use gradient angle to match the arrow direction
                    switch (e.Direction)
                    {
                        case ArrowDirection.Right:
                            angle = 0;
                            break;
                        case ArrowDirection.Left:
                            angle = 180f;
                            break;
                        case ArrowDirection.Down:
                            angle = 90f;
                            break;
                        case ArrowDirection.Up:
                            angle = 270f;
                            break;
                    }

                    // Draw the actual arrow using a gradient
                    using (LinearGradientBrush arrowBrush = new LinearGradientBrush(boundsF, color1, color2, angle))
                        e.Graphics.FillPath(arrowBrush, arrowPath);
                }
            }
        }
开发者ID:RSchwoerer,项目名称:Terminals,代码行数:48,代码来源:Office2007Renderer.cs


示例12: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     e.Direction = ArrowDirection.Right;
     base.OnRenderArrow(e);
 }
开发者ID:sschocke,项目名称:BrainSimulator,代码行数:5,代码来源:NodeToolStripRenderer.cs


示例13: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     using (var bmp = Bitmaps.Load("Arrow"))
         e.Graphics.DrawImage(bmp, new Point(e.Item.Bounds.Width - 10, e.ArrowRectangle.Y + 7));
 }
开发者ID:rizwan3d,项目名称:elalang,代码行数:5,代码来源:MenuRenderer.cs


示例14: DrawArrow

 /// <include file='doc\WinBarRenderer.uex' path='docs/doc[@for="ToolStripRenderer.DrawArrow"]/*' />
 public void DrawArrow(ToolStripArrowRenderEventArgs e) {            
     OnRenderArrow(e);
     
     ToolStripArrowRenderEventHandler eh = Events[EventRenderArrow] as ToolStripArrowRenderEventHandler;
     if (eh != null) {
         eh(this, e);
     }        
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:9,代码来源:ToolStripRenderer.cs


示例15: OnRenderArrow

 /// <summary>Override - see base.</summary>
 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     // The default renderer will draw an arrow for us (the UXTheme API seems not to have one for all directions),
     // but it will get the colour wrong in many cases. The text colour is probably the best colour to use.
     if (EnsureRenderer())
         e.ArrowColor = GetItemTextColor(e.Item);
     base.OnRenderArrow(e);
 }
开发者ID:RT-Projects,项目名称:RT.Util,代码行数:9,代码来源:NativeToolStripRenderer.cs


示例16: OnRenderArrow

        protected virtual void OnRenderArrow(ToolStripArrowRenderEventArgs e)
        {
            if (this.RendererOverride != null)
            {
                this.RendererOverride.OnRenderArrow(e);
            }
            else
            {
                Graphics graphics = e.Graphics;
                Rectangle arrowRectangle = e.ArrowRectangle;
                using (Brush brush = new SolidBrush(e.ArrowColor))
                {
                    Point point = new Point(arrowRectangle.Left + (arrowRectangle.Width / 2), arrowRectangle.Top + (arrowRectangle.Height / 2));
                    Point[] points = null;
                    switch (e.Direction)
                    {
                        case ArrowDirection.Left:
                            points = new Point[] { new Point(point.X + 2, point.Y - 4), new Point(point.X + 2, point.Y + 4), new Point(point.X - 2, point.Y) };
                            break;

                        case ArrowDirection.Up:
                            points = new Point[] { new Point(point.X - 2, point.Y + 1), new Point(point.X + 3, point.Y + 1), new Point(point.X, point.Y - 2) };
                            break;

                        case ArrowDirection.Right:
                            points = new Point[] { new Point(point.X - 2, point.Y - 4), new Point(point.X - 2, point.Y + 4), new Point(point.X + 2, point.Y) };
                            break;

                        default:
                            points = new Point[] { new Point(point.X - 2, point.Y - 1), new Point(point.X + 3, point.Y - 1), new Point(point.X, point.Y + 2) };
                            break;
                    }
                    graphics.FillPolygon(brush, points);
                }
            }
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:36,代码来源:ToolStripRenderer.cs


示例17: DrawArrow

		public void DrawArrow (ToolStripArrowRenderEventArgs e)
		{ this.OnRenderArrow (e); }
开发者ID:nagyist,项目名称:MonoMac.Windows.Form,代码行数:2,代码来源:ToolStripRenderer.cs


示例18: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     e.ArrowColor = e.Item.Enabled ? clrTxt : clrGray;
     base.OnRenderArrow(e);
 }
开发者ID:Nicologies,项目名称:QTTabBar,代码行数:5,代码来源:ToolStripClasses.cs


示例19: OnRenderArrow

 protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e)
 {
     int itemState = (int)(e.Item.Enabled ? NativeMethods.POPUPSUBMENUSTATES.MSM_NORMAL :
     NativeMethods.POPUPSUBMENUSTATES.MSM_DISABLED);
        using (Bitmap backBmp = new Bitmap(e.ArrowRectangle.Width, e.ArrowRectangle.Height))
        {
     using (Graphics backGfx = Graphics.FromImage(backBmp))
     {
      IntPtr hDC = backGfx.GetHdc();
      Rectangle backRect = new Rectangle(new Point(0, 0), backBmp.Size);
      NativeMethods.DrawThemeBackground(hTheme, hDC,
       (int)NativeMethods.MENUPARTS.MENU_POPUPSUBMENU, itemState,
       ref backRect, ref backRect);
      backGfx.ReleaseHdc();
     }
     e.Graphics.DrawImageUnscaled(backBmp, e.ArrowRectangle);
        }
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:18,代码来源:UxThemeApi.cs


示例20: OnRenderArrow

		protected override void OnRenderArrow (ToolStripArrowRenderEventArgs e)
		{
			base.OnRenderArrow (e);
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:ToolStripProfessionalRenderer.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Forms.ToolStripButton类代码示例发布时间:2022-05-26
下一篇:
C# Forms.ToolStrip类代码示例发布时间: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