Ejemplo n.º 1
0
		/// <summary>
		/// Raises RenderTreeBackground event.
		/// </summary>
		/// <param name="e">Event data.</param>
		protected virtual void OnRenderTreeBackground(TreeBackgroundRendererEventArgs e)
		{
			if(RenderTreeBackground!=null)
				RenderTreeBackground(this, e);
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Draws the tree background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you
		/// do not want default rendering to occur do not call the base implementation. You can call OnRenderTreeBackground method so events can occur.
		/// </summary>
		/// <param name="e">Information provided for rendering.</param>
		public override void DrawTreeBackground(TreeBackgroundRendererEventArgs e)
		{
			TreeGX tree = e.TreeGX;
			Graphics g = e.Graphics;
			
			if(!tree.BackColor.IsEmpty)
			{
				using(SolidBrush brush=new SolidBrush(tree.BackColor))
					g.FillRectangle(brush,tree.DisplayRectangle);
			}

			ElementStyleDisplayInfo info=new ElementStyleDisplayInfo();
			info.Bounds=tree.DisplayRectangle;
			info.Graphics=g;
			info.Style=tree.BackgroundStyle;
			ElementStyleDisplay.Paint(info);
			
			base.DrawTreeBackground (e);
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Draws the tree background. If you need to provide custom rendering this is the method that you should override in your custom rendered. If you
		/// do not want default rendering to occur do not call the base implementation. You can call OnRenderTreeBackground method so events can occur.
		/// </summary>
		/// <param name="e">Information provided for rendering.</param>
		public virtual void DrawTreeBackground(TreeBackgroundRendererEventArgs e)
		{
			OnRenderTreeBackground(e);
		}