How to implement a button styled tree view in c# winform application?
<p>I have a tree view in my winform application.I have set its DrawMode property to OwnerDrawAll and used its drawnode event to customize tree nodes as I wanted to show highlighted text when user performs a search.Now, I want to improve it further by making its nodes look like the ones in the screenshot.They look like buttons.But how do I draw a rectangle which look like a button.</p>

<p><a href="https://i.stack.imgur.com/Bdyfj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bdyfj.png" alt="enter image description here"></a></p>

<p>Here is my code to draw node.</p>

<pre><code> private void trwFileExplorer_DrawNode(object sender, DrawTreeNodeEventArgs)
 {
    if (e.Node.IsSelected || trwFileExplorer_SelectedNodes.Contains(e.Node))
     {
         e.Graphics.FillRectangle(blueBrush, e.Bounds);
         ControlPaint.DrawFocusRectangle(e.Graphics, e.Bounds, Color.White, blueBrush.Color);
         e.Node.BackColor = blueBrush.Color;
         e.Node.ForeColor = Color.White;
      }
      else
      {
          e.Node.ForeColor = Color.Black;
          e.Node.BackColor = Color.Empty;
          e.Graphics.FillRectangle(Brushes.White, e.Bounds);
       }
 }
</code></pre>