/// <summary> /// Raises RenderTreeBackground event. /// </summary> /// <param name="e">Event data.</param> protected virtual void OnRenderTreeBackground(TreeBackgroundRendererEventArgs e) { if(RenderTreeBackground!=null) RenderTreeBackground(this, e); }
/// <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); }
/// <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); }