This Button signals that a search is possible by showing a magnifying glass to the right of a search box. In this state the button is not enabled. When a search is active, it changes to an X that is enabled and when clicked on will revert to no search being active. Most of the work happens in the SearchIsActive setter. The Button's click event should be hooked up to a handler that clears the search (text) and (consequently) sets SearchIsActive to false.
Inheritance: System.Windows.Forms.Button
 private void SetupAndShowHeaderPanel(XmlNode node, RecordBar treeBarControl)
 {
     if (!treeBarControl.HasHeaderControl)
     {
         m_titleBar = new PaneBar { Dock = DockStyle.Top };
         var headerPanel = new Panel { Visible = false };
         headerPanel.Controls.Add(m_titleBar);
         m_btnCancelSearch = new FwCancelSearchButton();
         m_btnCancelSearch.Init();
         m_btnCancelSearch.Click += m_btnCancelSearch_Click;
         headerPanel.Controls.Add(m_btnCancelSearch);
         m_textSearch = CreateSearchBox();
         m_textSearch.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
         headerPanel.Controls.Add(m_textSearch);
         m_textSearch.AdjustForStyleSheet(m_stylesheet);
         headerPanel.Height = SetHeaderPanelHeight();
         treeBarControl.AddHeaderControl(headerPanel);
         // Keep the text box from covering the cancel search button
         m_textSearch.Width = headerPanel.Width - m_btnCancelSearch.Width;
         m_btnCancelSearch.Location = new Point(headerPanel.Width - m_btnCancelSearch.Width, m_textSearch.Location.Y);
         SetInfoBarText(node, m_titleBar);
     }
     treeBarControl.ShowHeaderControl();
 }