protected virtual void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { if (this.RendererOverride != null) { this.RendererOverride.OnRenderToolStripContentPanelBackground(e); } }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { base.OnRenderToolStripContentPanelBackground(e); e.Graphics.FillRectangle(toolBrush, new Rectangle(0, 0, e.ToolStripContentPanel.Width, e.ToolStripContentPanel.Height)); e.Graphics.DrawEllipse(new Pen(Color.Red), 0, 0, 25, 25); }
protected virtual void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { ToolStripContentPanelRenderEventHandler eh = (ToolStripContentPanelRenderEventHandler)Events [RenderToolStripContentPanelBackgroundEvent]; if (eh != null) { eh(this, e); } }
protected override void OnRenderToolStripContentPanelBackground(System.Windows.Forms.ToolStripContentPanelRenderEventArgs e) { if (currentRenderer != null) { currentRenderer.DrawToolStripContentPanelBackground(e); return; } base.OnRenderToolStripContentPanelBackground(e); }
public void DrawToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { OnRenderToolStripContentPanelBackground(e); ToolStripContentPanelRenderEventHandler eh = Events[EventRenderToolStripContentPanelBackground] as ToolStripContentPanelRenderEventHandler; if (eh != null) { eh(this, e); } }
protected override void OnPaintBackground(PaintEventArgs e) { ToolStripContentPanelRenderEventArgs args = new ToolStripContentPanelRenderEventArgs(e.Graphics, this); this.Renderer.DrawToolStripContentPanelBackground(args); if (!args.Handled) { base.OnPaintBackground(e); } }
public void DrawToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { this.OnRenderToolStripContentPanelBackground(e); ToolStripContentPanelRenderEventHandler handler = this.Events[EventRenderToolStripContentPanelBackground] as ToolStripContentPanelRenderEventHandler; if (handler != null) { handler(this, e); } }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { if (_currentRenderer != null) { _currentRenderer.DrawToolStripContentPanelBackground(e); } else { base.OnRenderToolStripContentPanelBackground(e); } }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { if (this.RendererOverride != null) { base.OnRenderToolStripContentPanelBackground(e); } else { ToolStripContentPanel toolStripContentPanel = e.ToolStripContentPanel; if (base.ShouldPaintBackground(toolStripContentPanel) && !SystemInformation.InLockedTerminalSession()) { e.Handled = true; e.Graphics.Clear(this.ColorTable.ToolStripContentPanelGradientEnd); } } }
public void DrawToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { this.OnRenderToolStripContentPanelBackground(e); }
protected override void OnRenderToolStripContentPanelBackground (ToolStripContentPanelRenderEventArgs e) { base.OnRenderToolStripContentPanelBackground (e); }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { if (currentRenderer != null) currentRenderer.DrawToolStripContentPanelBackground(e); else base.OnRenderToolStripContentPanelBackground(e); }
protected virtual void OnRenderToolStripContentPanelBackground (ToolStripContentPanelRenderEventArgs e) { ToolStripContentPanelRenderEventHandler eh = (ToolStripContentPanelRenderEventHandler)Events [RenderToolStripContentPanelBackgroundEvent]; if (eh != null) eh (this, e); }
/// <summary> /// Raises the RenderToolStripContentPanelBackground event. /// </summary> /// <param name="e">An ToolStripContentPanelRenderEventArgs containing the event data.</param> protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { // Must call base class, otherwise the subsequent drawing does not appear! base.OnRenderToolStripContentPanelBackground(e); if (ColorTable.UseSystemColors == false) { // Cannot paint a zero sized area if ((e.ToolStripContentPanel.Width > 0) && (e.ToolStripContentPanel.Height > 0)) { using (LinearGradientBrush backBrush = new LinearGradientBrush(e.ToolStripContentPanel.ClientRectangle, ColorTable.ToolStripContentPanelGradientBegin, ColorTable.ToolStripContentPanelGradientEnd, LinearGradientMode.Vertical)) { e.Graphics.FillRectangle(backBrush, e.ToolStripContentPanel.ClientRectangle); } } } }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// toolstripcontentpanelrendereventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this ToolStripContentPanelRenderEventHandler toolstripcontentpanelrendereventhandler, Object sender, ToolStripContentPanelRenderEventArgs e, AsyncCallback callback) { if(toolstripcontentpanelrendereventhandler == null) throw new ArgumentNullException("toolstripcontentpanelrendereventhandler"); return toolstripcontentpanelrendereventhandler.BeginInvoke(sender, e, callback, null); }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { //using(var brush = new HatchBrush(HatchStyle.Percent20, // ColorTable.ContentPanelForeground, // ColorTable.ContentPanelBackground)) using(var brush = new SolidBrush(ColorTable.ContentPanelBackground)) { e.Graphics.FillRectangle(brush, new Rectangle(Point.Empty, e.ToolStripContentPanel.Size)); } e.Handled = true; }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { //e.Graphics.FillRectangle(Brushes.RosyBrown, e.ToolStripContentPanel.ClientRectangle); //base.OnRenderToolStripContentPanelBackground(e); }
protected override void OnPaintBackground(PaintEventArgs e) { ToolStripContentPanelRenderEventArgs rea = new ToolStripContentPanelRenderEventArgs(e.Graphics, this); Renderer.DrawToolStripContentPanelBackground(rea); if (!rea.Handled) { base.OnPaintBackground(e); } }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { //base.OnRenderToolStripContentPanelBackground(e); e.Graphics.Clear(Dark); }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { this.renderer.DrawToolStripContentPanelBackground(e); }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { renderer.DrawToolStripContentPanelBackground(e); }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { if (e.ToolStripContentPanel.ClientRectangle.Width < 3 || e.ToolStripContentPanel.ClientRectangle.Height < 3) { return; } e.Handled = true; e.Graphics.SmoothingMode = _pManager.Mode; PaintBackground( e.Graphics, e.ToolStripContentPanel.ClientRectangle, _pManager.ContentPanelTop, _pManager.ContentPanelBottom, _pManager.BackgroundAngle, _pManager.BackgroundBlend ); }
public void DrawToolStripContentPanelBackground (ToolStripContentPanelRenderEventArgs e) { this.OnRenderToolStripContentPanelBackground (e); }
protected virtual void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { throw null; }
public void TestToolStripContentPanelRenderEventArgs() { Graphics g = Graphics.FromImage (new Bitmap (5, 5)); ToolStripContentPanel tscp = new ToolStripContentPanel(); ToolStripContentPanelRenderEventArgs e = new ToolStripContentPanelRenderEventArgs(g, tscp); Assert.AreEqual (g, e.Graphics, "BBB1"); Assert.AreEqual (false, e.Handled, "BBB2"); Assert.AreEqual (tscp, e.ToolStripContentPanel, "BBB3"); e.Handled = true; Assert.AreEqual (true, e.Handled, "BBB4"); }
protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { if (RendererOverride != null) { base.OnRenderToolStripContentPanelBackground(e); return; } ToolStripContentPanel toolStripContentPanel = e.ToolStripContentPanel; if (!ShouldPaintBackground(toolStripContentPanel)) { return; } if( SystemInformation.InLockedTerminalSession() ) { // see ddb#191714 return; } // dont paint background effects e.Handled = true; e.Graphics.Clear(ColorTable.ToolStripContentPanelGradientEnd); // RenderBackgroundGradient(e.Graphics, toolStripContentPanel, ColorTable.ToolStripContentPanelGradientBegin, ColorTable.ToolStripContentPanelGradientEnd); }
protected virtual void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { if (RendererOverride != null) { RendererOverride.OnRenderToolStripContentPanelBackground(e); return; } }
public void DrawToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e) { throw null; }