ZForge.Controls.TreeViewAdv.Tree.TreeColumn.CreateGhostImage C# (CSharp) Method

CreateGhostImage() private method

private CreateGhostImage ( Rectangle bounds, Font font ) : Bitmap
bounds System.Drawing.Rectangle
font System.Drawing.Font
return System.Drawing.Bitmap
        internal Bitmap CreateGhostImage(Rectangle bounds, Font font)
        {
            Bitmap b = new Bitmap(bounds.Width, bounds.Height, PixelFormat.Format32bppArgb);
            Graphics gr = Graphics.FromImage(b);
            gr.FillRectangle(SystemBrushes.ControlDark, bounds);
            DrawContent(gr, bounds, font);
            BitmapHelper.SetAlphaChanelValue(b, 150);
            return b;
        }

Usage Example

Beispiel #1
0
 public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point initialMouseLocation)
     : base(tree, column)
 {
     _location   = new Point(initialMouseLocation.X + Tree.OffsetX, 0);
     _dragOffset = tree.GetColumnX(column) - initialMouseLocation.X;
     _ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ColumnHeaderHeight), tree.Font);
 }
All Usage Examples Of ZForge.Controls.TreeViewAdv.Tree.TreeColumn::CreateGhostImage