Yes it is possible - I think. It certainly isn't going to be easy, and I don't think the effort is going to be worth the results...
TreeView does have a property BackgroundImage which you can set - it isn't listed in intellisense so you have to type the whole thing. Unfortunately, it does nothing, for reasons I cannot fathom. The "official" MS explanation that TreeView is derived from control does not really hold water, as the property exists, but ho hum.
You can provide your own background by overriding WndProc and trapping WM_ERASEBKGND in a derived class:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace GUITester
{
public partial class MyTreeView : TreeView
{
private Image background;
public Image Background
{
get { return background; }
set { background = value; }
}
public MyTreeView()
{
InitializeComponent();
background = Bitmap.FromFile(@"F:\Temp\XXX.jpg");
}
const int WM_ERASEBKGND = 20;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_ERASEBKGND)
{
using (Graphics g = CreateGraphics())
{
g.DrawImage(background, new Point(0, 0));
}
}
else
{
base.WndProc(ref m);
}
}
}
}
And this works - right up until you add nodes. Try it - it looks pretty horrible. So the obvious thing to do is to derive from TreeNode and pull the same trick. Only you can't - TreeNode doesn't expose WndProc. So you will have to get really clever and find some other way!
If you really must do this, then either write your own TreeView, or buy one in - I am sure there is such a thing out there!
If you do write it yourself, you could get a good article out of it!