System.Windows.Forms.ThemeWin32Classic.DrawToolBarButtonBorder C# (CSharp) Method

DrawToolBarButtonBorder() protected method

protected DrawToolBarButtonBorder ( Graphics dc, System.Windows.Forms.ToolBarItem item, bool is_flat ) : void
dc System.Drawing.Graphics
item System.Windows.Forms.ToolBarItem
is_flat bool
return void
		protected virtual void DrawToolBarButtonBorder (Graphics dc, ToolBarItem item, bool is_flat)
		{
			if (item.Button.Style == ToolBarButtonStyle.Separator)
				return;

			Border3DStyle style;

			if (is_flat) {
				if (item.Button.Pushed || item.Pressed)
					style = Border3DStyle.SunkenOuter;
				else if (item.Hilight)
					style = Border3DStyle.RaisedInner;
				else
					return;

			} else {
				if (item.Button.Pushed || item.Pressed)
					style = Border3DStyle.Sunken;
				else 
					style = Border3DStyle.Raised;
			}
			
			Rectangle rect = item.Rectangle;
			if ((item.Button.Style == ToolBarButtonStyle.DropDownButton) && (item.Button.Parent.DropDownArrows) && is_flat)
				rect.Width -= ToolBarDropDownWidth;

			CPDrawBorder3D (dc, rect, style, all_sides);
		}
ThemeWin32Classic